ansible: Register SLES nodes if necessary
[lttng-ci.git] / automation / ansible / roles / common / tasks / users.yml
CommitLineData
d82e5cee 1---
170dfe8d
MJ
2- name: Set up authorized_keys for the root user
3 authorized_key:
4 user: 'root'
5 key: "{% for key in query('fileglob', 'public_keys/*.pub') %}{{ lookup('file', key) ~ '\n'}}{% endfor %}\n{% for key in lookup('vars', 'extra_root_ssh_authorized_keys', default=[]) %}{{ key ~ '\n' }}{% endfor %}"
6 exclusive: true
7
d82e5cee
KS
8- name: Remove ubuntu user
9 user:
10 name: ubuntu
11 state: absent
12 remove: yes
13
14- name: Remove debian user
15 user:
16 name: debian
17 state: absent
18 remove: yes
19
20- name: Create jenkins user
21 when: jenkins_user | bool
22 user:
23 name: 'jenkins'
24
25- name: Set up authorized_keys for the jenkins user
26 when: jenkins_user | bool
27 authorized_key:
28 user: 'jenkins'
29 # yamllint disable-line rule:line-length
30 key: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDA3fwpioVLDoCQsQkYK5bOwPb8N0EXeYm2MleBQTfqxtKaqWWbmUtFXAiyclKHRspjcAiIKwwqLyhPopHBqJzmXnB0GsfGmxXJ6wSBgKJ4kdBVRM+nKlK0wCl1oQkFeV/Xl3jzt1Ey96XiNWlesfkvgcMCpsJzQ7/xRb9IcghskzlQbLOwDNir/156JgAYUYvOLqNCcE+xcgPxJGanfZDXTLkfBYxaeaB8isBPeEU6fhPvu/W055M1uB7E0qhcbFtuKCBu1Fg4jzsW4yDU8+ZB1b5mAXwEAuMbVGMrOf4rjtTpGpQd6XFsXpFT28NU1u5j2cUbtANJalkNDX/UY6XJ jenkins@ci-master-02'
31- name: Remove jenkins sudoers file
32 file:
33 path: "/etc/sudoers.d/jenkins"
34 state: absent
This page took 0.023356 seconds and 4 git commands to generate.