ansible/utils/version_check.yml

22 lines
637 B
YAML
Raw Normal View History

2021-02-10 11:01:42 +01:00
#!/usr/bin/env ansible-playbook
---
# Check for the distribution
- hosts: localhost
tasks:
2021-02-10 11:04:06 +01:00
- name: Make sure local file exist but is empty # weird hack, I know
copy:
dest: /tmp/ansible_dump_reboot_needed.txt
content: ""
force: true
mode: 0644
2021-02-10 11:01:42 +01:00
- 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
2021-02-16 15:43:52 +01:00
line: "[{{ ansible_facts['nodename'] }}] {{ ansible_fqdn }} : {{
2021-02-10 11:01:42 +01:00
ansible_distribution }} {{ ansible_distribution_version }}"