a8798c55a5a06f35183f30febfbf03cc8215fe86
[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: "{{ item }}"
5 with_first_found:
6 - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
7 - "{{ ansible_distribution }}.yml"
8 - "{{ ansible_os_family }}.yml"
9
10 # Setup/install tasks.
11 - include: setup-RedHat.yml
12 when: ansible_os_family in ['RedHat', 'Rocky']
13
14 - include: setup-Debian.yml
15 when: ansible_os_family == 'Debian'
16
17 - include: setup-Alpine.yml
18 when: ansible_os_family == 'Alpine'
19
20 - include: setup-Suse.yml
21 when: ansible_os_family == 'Suse'
22
23 - include: setup-Windows.yml
24 when: ansible_os_family == "Windows"
25
26 - name: Set up authorized_keys for the root user
27 authorized_key:
28 user: 'root'
29 key: "{% for key in query('fileglob', 'public_keys/*.pub') %}{{ lookup('file', key) ~ '\n'}}{% endfor %}"
30 exclusive: true
31 when: ansible_os_family != 'Windows'
32
33 - include: users-Windows.yml
34 when: ansible_os_family == "Windows"
35
36 - include: users.yml
37 when: ansible_os_family != "Windows"
This page took 0.033919 seconds and 3 git commands to generate.