The commit updates the `tasks` directory by adding new roles (`rapbian_desktop_prov.yml`, `test_remote.yml`, `update_roles.sh`) and tasks within these roles. This refactoring enhances the organization and maintainability of the Ansible playbook.
24 lines
829 B
YAML
24 lines
829 B
YAML
- name: Gather and print relevant system facts
|
|
hosts: all
|
|
gather_facts: false # disable default full fact gathering
|
|
|
|
tasks:
|
|
- name: Gather only selected facts
|
|
ansible.builtin.setup:
|
|
filter:
|
|
- ansible_hostname
|
|
- ansible_distribution
|
|
- ansible_distribution_version
|
|
- ansible_kernel
|
|
- ansible_architecture
|
|
- ansible_default_ipv4
|
|
|
|
- name: Show relevant facts
|
|
ansible.builtin.debug:
|
|
msg:
|
|
- "Hostname: {{ ansible_facts['hostname'] }}"
|
|
- "OS: {{ ansible_facts['distribution'] }} {{ ansible_facts['distribution_version'] }}"
|
|
- "Kernel: {{ ansible_facts['kernel'] }}"
|
|
- "Architecture: {{ ansible_facts['architecture'] }}"
|
|
- "IP Address: {{ ansible_facts['default_ipv4']['address'] }}"
|