40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
- 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
|