You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mitogen/tests/ansible/setup/report_targets.yml

36 lines
1.0 KiB
YAML

- name: Report target facts
hosts: localhost:test-targets
gather_facts: true
tasks:
- debug: {var: ansible_facts.distribution}
- debug: {var: ansible_facts.distribution_major_version}
- debug: {var: ansible_facts.distribution_release}
- debug: {var: ansible_facts.distribution_version}
- debug: {var: ansible_facts.kernel}
- debug: {var: ansible_facts.kernel_version}
- debug: {var: ansible_facts.os_family}
- debug: {var: ansible_facts.osrevision}
- debug: {var: ansible_facts.osversion}
- debug: {var: ansible_facts.python}
- debug: {var: ansible_facts.system}
- name: Check target versions
hosts: localhost:test-targets
check_mode: false
tasks:
- name: Get command versions
command:
cmd: "{{ item.cmd }}"
changed_when: false
check_mode: false
loop:
- cmd: sudo -V
register: command_versions
- name: Show command versions
debug:
msg: |
cmd: {{ item.item.cmd }}
{{ item.stdout }}
loop: "{{ command_versions.results }}"