diff --git a/tasks/main.yml b/tasks/main.yml index af856ff..9771528 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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