ansible: Add support for common configuration on Windows hosts
[lttng-ci.git] / automation / ansible / roles / common / tasks / main.yml
CommitLineData
3ea0152b
MJ
1---
2# Include variables and define needed variables.
3- name: Include OS-specific variables.
9e2e4e6b
MJ
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"
3ea0152b
MJ
9
10# Setup/install tasks.
11- include: setup-RedHat.yml
9e2e4e6b 12 when: ansible_os_family in ['RedHat', 'Rocky']
3ea0152b
MJ
13
14- include: setup-Debian.yml
15 when: ansible_os_family == 'Debian'
16
1be0d012
MJ
17- include: setup-Alpine.yml
18 when: ansible_os_family == 'Alpine'
19
599b56d0
MJ
20- include: setup-Suse.yml
21 when: ansible_os_family == 'Suse'
22
d82e5cee
KS
23- include: setup-Windows.yml
24 when: ansible_os_family == "Windows"
25
5e186c3f
MJ
26- name: Set up authorized_keys for the root user
27 authorized_key:
28 user: 'root'
c0d69812
MJ
29 key: "{% for key in query('fileglob', 'public_keys/*.pub') %}{{ lookup('file', key) ~ '\n'}}{% endfor %}"
30 exclusive: true
d82e5cee 31 when: ansible_os_family != 'Windows'
5e186c3f 32
d82e5cee
KS
33- include: users-Windows.yml
34 when: ansible_os_family == "Windows"
a517d31d 35
d82e5cee
KS
36- include: users.yml
37 when: ansible_os_family != "Windows"
This page took 0.030524 seconds and 4 git commands to generate.