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.
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 }}"
|