Deleted non-role playbooks, and fixed up role tasks
This commit is contained in:
14
roles/arch_update/tasks/aur_rebuild.yaml
Normal file
14
roles/arch_update/tasks/aur_rebuild.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
- name: Get list of AUR Python packages that need to be rebuilt
|
||||
ansible.builtin.shell:
|
||||
cmd:
|
||||
comm -12 <(pactree -lrud1 {{ package_pattern }} | sort -u) <(pacman -Qqm | sort -u)
|
||||
register: aur_packages
|
||||
- name: Rebuild AUR Python packages
|
||||
aur:
|
||||
use: pikaur
|
||||
name: '{{ item }}'
|
||||
aur_only: true
|
||||
extra_args: --rebuild
|
||||
loop: '{{ aur_packages.stdout.split() }}'
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
aur_only: true
|
||||
|
||||
- name: Rebuild AUR Python packages if version changed
|
||||
ansible.builtin.import_tasks: aur_rebuild.yml
|
||||
ansible.builtin.import_tasks: aur_rebuild.yaml
|
||||
check_mode: false
|
||||
vars:
|
||||
package_pattern: python
|
||||
when: new_python is version(orig_python, '>', version_type='strict')
|
||||
|
||||
@@ -13,5 +13,4 @@
|
||||
target_var: new_python
|
||||
|
||||
- name: Perform AUR updates and rebuilds
|
||||
ansible.builtin.import_tasks: aur_update.yml
|
||||
|
||||
ansible.builtin.import_tasks: aur_upgrade.yaml
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
- name: Full system upgrade
|
||||
become: true
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
upgrade: full
|
||||
become: true
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
upgrade: full
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
- name: Perform official repository updates ansible.builtin.import_tasks: apt_upgrade.yaml
|
||||
- name: Perform official repository updates
|
||||
ansible.builtin.import_tasks: apt_upgrade.yaml
|
||||
|
||||
@@ -6,5 +6,7 @@
|
||||
failed_when: false
|
||||
# Trigger the handler ONLY if the script returns true (exit code 0)
|
||||
changed_when: reboot_check.rc == 0
|
||||
# Forces this specific task to run during a dry run
|
||||
check_mode: false
|
||||
notify: Reboot system
|
||||
|
||||
|
||||
Reference in New Issue
Block a user