Debian Codegraph @

tests/ansible/setup/report_targets.yml

raw
1 - name: Report target facts
2 hosts: localhost:test-targets
3 gather_facts: true
4 tasks:
5 - debug: {var: ansible_facts.distribution}
6 - debug: {var: ansible_facts.distribution_major_version}
7 - debug: {var: ansible_facts.distribution_release}
8 - debug: {var: ansible_facts.distribution_version}
9 - debug: {var: ansible_facts.kernel}
10 - debug: {var: ansible_facts.kernel_version}
11 - debug: {var: ansible_facts.os_family}
12 - debug: {var: ansible_facts.osrevision}
13 - debug: {var: ansible_facts.osversion}
14 - debug: {var: ansible_facts.python}
15 - debug: {var: ansible_facts.system}
16
17 - name: Check target versions
18 hosts: localhost:test-targets
19 check_mode: false
20 tasks:
21 - name: Get command versions
22 command:
23 cmd: "{{ item.cmd }}"
24 changed_when: false
25 check_mode: false
26 loop:
27 - cmd: sudo -V
28 register: command_versions
29
30 - name: Show command versions
31 debug:
32 msg: |
33 cmd: {{ item.item.cmd }}
34 {{ item.stdout }}
35 loop: "{{ command_versions.results }}"