Skip to content

Commit

Permalink
Add posibility to disable autoremove and autoclean (enabled by default)
Browse files Browse the repository at this point in the history
  • Loading branch information
klen committed Apr 17, 2014
1 parent 1b93622 commit 1bf4dcb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ apt_reset_source_list: no # reset the /etc/apt/sources.list to the defau
apt_cache_valid_time: 3600 # Time (in seconds) the apt cache stays valid
apt_install_recommends: no # whether or not to install the "recommended" packages
apt_install_suggests: no # whether or not to install the "suggested" packages
apt_autoremove: yes # remove packages that are no longer needed for dependencies
apt_autoclean: yes # remove .deb files for packages no longer on your system
```
Remark: Beware that setting `apt_install_recommends` and `apt_install_suggests` to `yes` may heavily increase the apt-requirements (and hence disk usage). You should proceed cautiously changing these.
Expand Down
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ apt_reset_source_list: no # reset the /etc/apt/sources.list to the defau
apt_cache_valid_time: 3600 # Time (in seconds) the apt cache stays valid
apt_install_recommends: no # whether or not to install the "recommended" packages
apt_install_suggests: no # whether or not to install the "suggested" packages
apt_autoremove: yes # remove packages that are no longer needed for dependencies
apt_autoclean: yes # remove .deb files for packages no longer on your system
2 changes: 2 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@

- name: APT | Remove packages that are no longer needed for dependencies
shell: apt-get -y autoremove
when: apt_autoremove

- name: APT | Remove .deb files for packages no longer on your system
shell: apt-get -y autoclean
when: apt_autoclean

- name: APT | Update the general configuration (/etc/apt/apt.conf.ds/10general)
template:
Expand Down

0 comments on commit 1bf4dcb

Please sign in to comment.