23 lines
988 B
YAML
23 lines
988 B
YAML
---
|
|
|
|
- name: "Getting guest operating system information."
|
|
ansible.builtin.debug:
|
|
msg: "OS: {{ ansible_distribution }} Version: {{ ansible_distribution_version }} Family: {{ ansible_os_family }}"
|
|
|
|
- name: Prepare the {{ ansible_facts['distribution'] }} guest operating system
|
|
include_tasks: "{{ ansible_facts['distribution'] | lower }}.yml"
|
|
when: "ansible_facts['distribution'] == 'Debian'"
|
|
|
|
- name: Prepare the {{ ansible_facts['distribution'] }} guest operating system
|
|
include_tasks: "{{ ansible_facts['distribution'] | lower }}.yml"
|
|
when: "ansible_facts['distribution'] == 'Ubuntu'"
|
|
|
|
- name: Prepare the {{ ansible_facts['distribution'] }} guest operating system
|
|
include_tasks: redhat.yml
|
|
when: "ansible_facts['distribution'] in ['RedHat', 'CentOS', 'Rocky', 'AlmaLinux', 'OracleLinux']"
|
|
|
|
- name: Prepare the {{ ansible_facts['distribution'] }} guest operating system
|
|
include_tasks: suse.yml
|
|
when: "ansible_facts['distribution'] in ['openSUSE Leap', 'Suse']"
|
|
|
|
... |