homeserver/roles/mgrote.pve_nag-buster/tasks/main.yml

41 lines
1.1 KiB
YAML
Raw Normal View History

2020-08-18 11:57:53 +02:00
- name: check if updates should be applied
become: yes
stat:
path: "/root/pve-nag-buster/is_installed"
register: "is_installed"
# - name: dbug
# debug:
# msg: "{{ is_installed }}"
# - set_fact: is_installed.stat.exists = false
# when: pve_nag_buster_update == true
- name: create "/root/pve-nag-buster"
become: yes
file:
path: /root/pve-nag-buster
state: directory
when: (not is_installed.stat.exists) or (pve_nag_buster_update)
- name: download nag-buster-script
become: yes
get_url:
url: https://raw.githubusercontent.com/foundObjects/pve-nag-buster/master/install.sh
dest: /root/pve-nag-buster/install.sh
mode: 775
when: (not is_installed.stat.exists) or (pve_nag_buster_update)
- name: execute script
become: yes
command: /root/pve-nag-buster/install.sh
when: (not is_installed.stat.exists) or (pve_nag_buster_update)
- name: touch "update"
become: yes
file:
path: /root/pve-nag-buster/is_installed
state: touch
access_time: preserve
modification_time: preserve