20 lines
557 B
YAML
20 lines
557 B
YAML
|
#!/usr/bin/env ansible-playbook
|
||
|
---
|
||
|
# Check for the distribution
|
||
|
- hosts: localhost
|
||
|
tasks:
|
||
|
- name: Delete local tmp file
|
||
|
file:
|
||
|
path: /tmp/ansible_dump_dist_version.txt
|
||
|
state: absent
|
||
|
|
||
|
- hosts: all,!unifi
|
||
|
tasks:
|
||
|
# Add info line by line
|
||
|
- name: Dump all info into the local file
|
||
|
delegate_to: localhost
|
||
|
lineinfile:
|
||
|
path: /tmp/ansible_dump_dist_version.txt
|
||
|
line: "[{{ ansible_facts['nodename'] }}] {{ansible_fqdn}} : {{
|
||
|
ansible_distribution }} {{ ansible_distribution_version }}"
|