ansible: moved artifacts to git-mirror
[lttng-ci.git] / automation / ansible / roles / common / tasks / main.yml
1 ---
2 # Include variables and define needed variables.
3 - name: Include OS-specific variables.
4 include_vars: "{{ ansible_os_family }}.yml"
5
6 - name: Define common_packages.
7 set_fact:
8 common_packages: "{{ __common_packages | list }}"
9 when: common_packages is not defined
10
11 # Setup/install tasks.
12 - include: setup-RedHat.yml
13 when: ansible_os_family == 'RedHat'
14
15 - include: setup-Debian.yml
16 when: ansible_os_family == 'Debian'
17
18 - include: setup-Alpine.yml
19 when: ansible_os_family == 'Alpine'
20
21 - name: Remove ubuntu user
22 user:
23 name: ubuntu
24 state: absent
25 remove: yes
26
27 - name: Create jenkins user
28 user:
29 name: 'jenkins'
30
31 - name: Set up authorized_keys for the jenkins user
32 authorized_key:
33 user: 'jenkins'
34 key: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDA3fwpioVLDoCQsQkYK5bOwPb8N0EXeYm2MleBQTfqxtKaqWWbmUtFXAiyclKHRspjcAiIKwwqLyhPopHBqJzmXnB0GsfGmxXJ6wSBgKJ4kdBVRM+nKlK0wCl1oQkFeV/Xl3jzt1Ey96XiNWlesfkvgcMCpsJzQ7/xRb9IcghskzlQbLOwDNir/156JgAYUYvOLqNCcE+xcgPxJGanfZDXTLkfBYxaeaB8isBPeEU6fhPvu/W055M1uB7E0qhcbFtuKCBu1Fg4jzsW4yDU8+ZB1b5mAXwEAuMbVGMrOf4rjtTpGpQd6XFsXpFT28NU1u5j2cUbtANJalkNDX/UY6XJ jenkins@ci-master-02'
35
36 #- name: Create sudoers.d directory.
37 # file:
38 # path: /etc/sudoers.d
39 # owner: root
40 # group: root
41 # mode: 0755
42 # state: directory
43 #
44 #- name: Set includedir in /etc/sudoers.
45 # lineinfile:
46 # dest: /etc/sudoers
47 # line: "#includedir /etc/sudoers.d"
48 # state: present
49 # validate: "/usr/sbin/visudo -cf %s"
50 #
51 #- name: Create jenkins sudoers file.
52 # copy:
53 # dest: "/etc/sudoers.d/jenkins"
54 # content: "jenkins ALL=NOPASSWD: ALL"
55 # mode: 0440
56 # owner: root
57 # group: root
58 # validate: "/usr/sbin/visudo -cf %s"
59
60 - name: Remove jenkins sudoers file
61 file:
62 path: "/etc/sudoers.d/jenkins"
63 state: absent
This page took 0.032248 seconds and 5 git commands to generate.