logic corrected
This commit is contained in:
13
local.yml
13
local.yml
@@ -24,12 +24,6 @@
|
|||||||
- (ansible_date_time.epoch | int) - (marker_file_stat.stat.mtime | int) < (ansible_reboot_cooldown_minutes | int * 60)
|
- (ansible_date_time.epoch | int) - (marker_file_stat.stat.mtime | int) < (ansible_reboot_cooldown_minutes | int * 60)
|
||||||
tags: always
|
tags: always
|
||||||
|
|
||||||
- name: pre-run | update marker file timestamp
|
|
||||||
file:
|
|
||||||
path: "{{ ansible_pull_marker_file }}"
|
|
||||||
state: touch
|
|
||||||
tags: always
|
|
||||||
|
|
||||||
- name: pre-run | update apt repository (debian, ubuntu, etc.) # noqa no-changed-when
|
- name: pre-run | update apt repository (debian, ubuntu, etc.) # noqa no-changed-when
|
||||||
apt: update_cache=yes
|
apt: update_cache=yes
|
||||||
#changed_when: false
|
#changed_when: false
|
||||||
@@ -167,7 +161,7 @@
|
|||||||
# end of roles; cleanup and reporting
|
# end of roles; cleanup and reporting
|
||||||
- hosts: all
|
- hosts: all
|
||||||
become: true
|
become: true
|
||||||
tasks:
|
post_tasks:
|
||||||
- name: cleanup package cache (debian and ubuntu)
|
- name: cleanup package cache (debian and ubuntu)
|
||||||
tags: always
|
tags: always
|
||||||
apt:
|
apt:
|
||||||
@@ -182,6 +176,11 @@
|
|||||||
purge: yes
|
purge: yes
|
||||||
when: ansible_distribution in ["Debian", "Pop!_OS", "Ubuntu", "Linux Mint"]
|
when: ansible_distribution in ["Debian", "Pop!_OS", "Ubuntu", "Linux Mint"]
|
||||||
|
|
||||||
|
- name: post-run | update marker file timestamp on successful run
|
||||||
|
file:
|
||||||
|
path: "{{ ansible_pull_marker_file }}"
|
||||||
|
state: touch
|
||||||
|
tags: always
|
||||||
# - name: send completion alert
|
# - name: send completion alert
|
||||||
# include_tasks: playbooks/send_completion_alert.yml
|
# include_tasks: playbooks/send_completion_alert.yml
|
||||||
# tags: always
|
# tags: always
|
||||||
|
|||||||
Reference in New Issue
Block a user