added archlinux support to package upgrades roles
This commit is contained in:
parent
dafc6f219c
commit
193200aa85
|
@ -32,4 +32,17 @@
|
|||
debug: msg={{ dchkout }}
|
||||
when: dchkout.stdout_lines is undefined and ansible_os_family == "Debian"
|
||||
|
||||
- name: Checked for updates (Arch based distros)
|
||||
shell:
|
||||
cmd: pacman -Qu
|
||||
register: achkout
|
||||
when: ansible_os_family == "Archlinux"
|
||||
# 'pacman -Qu' returns a 1 when no packages require upgrade
|
||||
# this line stops the role from failing with a 'non-zero result'
|
||||
failed_when: "achkout.rc not in [ 0, 1 ]"
|
||||
|
||||
- name: Show output from update check (arch 1)
|
||||
debug: msg={{ achkout.stdout_lines }}
|
||||
when: achkout.stdout_lines is defined and ansible_os_family == "Archlinux"
|
||||
|
||||
# EOF
|
||||
|
|
Loading…
Reference in New Issue