Use apt module to run apt-get commands

Removes some warning messages from ansible output
This commit is contained in:
Charlie O'Keefe 2018-03-21 10:51:40 -06:00
parent e2b907ba54
commit efb1f0acb2
2 changed files with 4 additions and 6 deletions

View File

@ -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

View File

@ -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