Switched to usage of FQCNs
This commit is contained in:
20
local.yml
20
local.yml
@@ -12,31 +12,31 @@
|
||||
|
||||
pre_tasks:
|
||||
- name: pre-run | get status of marker file
|
||||
stat:
|
||||
ansible.builtin.stat:
|
||||
path: "{{ ansible_pull_marker_file }}"
|
||||
register: marker_file_stat
|
||||
tags: always
|
||||
|
||||
- name: pre-run | check if last run was within cooldown period
|
||||
meta: end_play
|
||||
ansible.builtin.meta: end_play
|
||||
when:
|
||||
- marker_file_stat.stat.exists
|
||||
- (ansible_date_time.epoch | int) - (marker_file_stat.stat.mtime | int) < (ansible_reboot_cooldown_minutes | int * 60)
|
||||
tags: always
|
||||
|
||||
- name: pre-run | set marker file path as a cached fact
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
ansible_pull_marker_file: "{{ ansible_pull_marker_file }}"
|
||||
cacheable: true
|
||||
tags: always
|
||||
|
||||
- name: pre-run | update apt repository (debian, ubuntu, etc.) # noqa no-changed-when
|
||||
apt: update_cache=yes
|
||||
ansible.builtin.apt: update_cache=yes
|
||||
#changed_when: false
|
||||
when: ansible_distribution in ["Debian", "Ubuntu", "Linux Mint"]
|
||||
ignore_errors: True
|
||||
- name: pre-run | update pacman repository (arch)
|
||||
pacman: update_cache=yes
|
||||
community.general.pacman: update_cache=yes
|
||||
#changed_when: false
|
||||
when: ansible_distribution == 'Archlinux'
|
||||
ignore_errors: True
|
||||
@@ -50,12 +50,12 @@
|
||||
- hosts: all:!database
|
||||
pre_tasks:
|
||||
- name: pre-run | upgrade system (debian, ubuntu, etc.)
|
||||
apt: upgrade=dist
|
||||
ansible.builtin.apt: upgrade=dist
|
||||
#changed_when: false
|
||||
when: ansible_distribution in ["Debian", "Ubuntu", "Linux Mint"]
|
||||
ignore_errors: True
|
||||
- name: pre-run | upgrade system (arch)
|
||||
pacman: upgrade=true
|
||||
community.general.pacman: upgrade=true
|
||||
when: ansible_distribution == 'Archlinux'
|
||||
ignore_errors: True
|
||||
|
||||
@@ -216,14 +216,14 @@
|
||||
post_tasks:
|
||||
- name: cleanup package cache (debian and ubuntu)
|
||||
tags: always
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
autoclean: yes
|
||||
changed_when: false
|
||||
when: ansible_distribution in ["Debian", "Pop!_OS", "Ubuntu", "Linux Mint"]
|
||||
|
||||
- name: autoremove orphan packages (debian and ubuntu)
|
||||
tags: always
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
autoremove: yes
|
||||
purge: yes
|
||||
when: ansible_distribution in ["Debian", "Pop!_OS", "Ubuntu", "Linux Mint"]
|
||||
@@ -231,7 +231,7 @@
|
||||
- name: post-run | update marker file timestamp on successful run
|
||||
file:
|
||||
path: "{{ ansible_pull_marker_file }}"
|
||||
state: touch
|
||||
state: ansible.builtin.touch
|
||||
tags: always
|
||||
# - name: send completion alert
|
||||
# include_tasks: playbooks/send_completion_alert.yml
|
||||
|
||||
Reference in New Issue
Block a user