Skip to content

Commit

Permalink
Ignore errors from autoremove and autoclean
Browse files Browse the repository at this point in the history
If apt is locked in "autoremove and autoclean " dont panic just ignore errors its not vital and ansible should not fail. wait for next run
  • Loading branch information
ahelal committed May 6, 2015
1 parent f9c3bfc commit 840b39d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tasks/apt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@
when: apt_autoremove
register: apt_autoremove_var
changed_when: "'Removing' in apt_autoremove_var.stdout"
ignore_errors: yes

- name: APT | Clear local repository of retrieved package files
shell: apt-get -y autoclean
when: apt_autoclean
register: apt_autoclean_var
changed_when: "'Del' in apt_autoclean_var.stdout"
ignore_errors: yes

- name: APT | Ensure the apt configuration in /etc/apt/apt.conf.ds/99customsettings is updated
template:
Expand Down

0 comments on commit 840b39d

Please sign in to comment.