ansible/utils/version_check.yml
Solal Nathan df8bae6df7
Some checks failed
continuous-integration/drone/push Build is failing
Add utils
2021-02-10 11:02:17 +01:00

19 lines
557 B
YAML
Executable file

#!/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 }}"