Use apt module to run apt-get commands
Removes some warning messages from ansible output
This commit is contained in:
parent
e2b907ba54
commit
efb1f0acb2
|
@ -38,7 +38,6 @@
|
|||
tags: apt
|
||||
|
||||
- name: Remove unneeded packages.
|
||||
command: apt-get autoremove -y
|
||||
register: autoremove_result
|
||||
changed_when: "'0 upgraded' not in autoremove_result.stdout"
|
||||
apt:
|
||||
autoremove: yes
|
||||
tags: apt
|
||||
|
|
|
@ -203,9 +203,8 @@
|
|||
executable: /bin/bash
|
||||
|
||||
- name: Clean the apt cache to free up space.
|
||||
command: apt-get autoclean
|
||||
register: autoclean_result
|
||||
changed_when: "'Del' in autoclean_result.stdout"
|
||||
apt:
|
||||
autoclean: yes
|
||||
|
||||
- include_tasks: gpg.yml
|
||||
tags: gpg
|
||||
|
|
Loading…
Reference in New Issue