added AlmaLinux to playbooks/pkg_upgrade.yml

This commit is contained in:
Jens Heinitz 2021-06-10 17:10:58 +02:00
parent d953a2fa6b
commit 3d05eeab9c
3 changed files with 28 additions and 54 deletions

View File

@ -1,50 +0,0 @@
---
- name: Linux Package Upgrade
hosts: all
remote_user: root
tasks:
- name: "[Debian] Refresh Package Cache if not older that 1h"
apt:
update_cache: yes
cache_valid_time: 3600
become: true
when: ansible_os_family == "Debian"
- name: "[AlmaLinux] Refresh Package Cache if not older that 1h"
dnf:
update_cache: yes
become: true
when: ansible_os_family == "AlmaLinux"
- name: "[Debian] Remove Packages that can no longer be downloaded"
apt:
autoclean: yes
become: true
when: ansible_os_family == "Debian"
- name: "[Debian] Remove packages that are no longer required"
apt:
autoremove: yes
become: true
when: ansible_os_family == "Debian"
- name: "[AlmaLinux] Remove packages that are no longer required"
dnf:
autoremove: yes
become: true
when: ansible_os_family == "AlmaLinux"
- name: "[Debian] Upgrade all packages that need an update"
apt:
upgrade: full
become: true
when: ansible_os_family == "Debian"
- name: "[AlmaLinux] Upgrade all packages that need an update"
dnf:
name: "*"
state: latest
become: true
when: ansible_os_family == "AlmaLinux"
...

View File

@ -3,25 +3,48 @@
hosts: all
remote_user: root
tasks:
- name: Refresh Package Cache if not older that 1h
- name: "[Debian] Refresh Package Cache if not older that 1h"
apt:
update_cache: yes
cache_valid_time: 3600
become: true
when: ansible_os_family == "Debian"
- name: Remove Packages that can no longer be downloaded
- name: "[AlmaLinux] Refresh Package Cache if not older that 1h"
dnf:
update_cache: yes
become: true
when: ansible_os_family == "AlmaLinux"
- name: "[Debian] Remove Packages that can no longer be downloaded"
apt:
autoclean: yes
become: true
when: ansible_os_family == "Debian"
- name: Remove packages that are no longer required
- name: "[Debian] Remove packages that are no longer required"
apt:
autoremove: yes
become: true
when: ansible_os_family == "Debian"
- name: Upgrade all packages that need an update
- name: "[AlmaLinux] Remove packages that are no longer required"
dnf:
autoremove: yes
become: true
when: ansible_os_family == "AlmaLinux"
- name: "[Debian] Upgrade all packages that need an update"
apt:
upgrade: full
become: true
when: ansible_os_family == "Debian"
- name: "[AlmaLinux] Upgrade all packages that need an update"
dnf:
name: "*"
state: latest
become: true
when: ansible_os_family == "AlmaLinux"
...

View File

@ -53,6 +53,7 @@ pg_port: 5432
pg_username: 'awxuser'
pg_database: 'awx'
pg_password: 'awxpassw0rd'
pg_database_dumpdir: "{{ awx_composedir }}/backup"
#
# Number of AWX containers. If set to 1, no haproxy is deployed
#