2 # Include variables and define needed variables.
3 - name: Include OS-specific variables.
4 include_vars: "{{ item }}"
6 - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
7 - "{{ ansible_distribution }}.yml"
8 - "{{ ansible_os_family }}.yml"
10 # Setup/install tasks.
11 - include: setup-RedHat.yml
12 when: ansible_os_family in ['RedHat', 'Rocky']
14 - include: setup-Debian.yml
15 when: ansible_os_family == 'Debian'
17 - include: setup-Alpine.yml
18 when: ansible_os_family == 'Alpine'
20 - include: setup-Suse.yml
21 when: ansible_os_family == 'Suse'
23 - include: setup-Windows.yml
24 when: ansible_os_family == "Windows"
26 - name: Set up authorized_keys for the root user
29 key: "{% for key in query('fileglob', 'public_keys/*.pub') %}{{ lookup('file', key) ~ '\n'}}{% endfor %}"
31 when: ansible_os_family != 'Windows'
33 - include: users-Windows.yml
34 when: ansible_os_family == "Windows"
37 when: ansible_os_family != "Windows"