Merge "base-server: disable install of suggests and recommends packages"
This commit is contained in:
commit
34d2dcc928
2
playbooks/roles/base-server/files/95disable-recommends
Normal file
2
playbooks/roles/base-server/files/95disable-recommends
Normal file
@ -0,0 +1,2 @@
|
||||
APT::Install-Recommends "0";
|
||||
APT::Install-Suggests "0";
|
@ -1,3 +1,11 @@
|
||||
- name: Disable install of additional recommends and suggests packages
|
||||
copy:
|
||||
mode: 0444
|
||||
src: 95disable-recommends
|
||||
dest: /etc/apt/apt.conf.d/
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
# NOTE(ianw) There are ordering issues with this. Hopefully when
|
||||
# we're bionic only we can just remove ntp
|
||||
- name: Install NTP
|
||||
|
@ -162,3 +162,11 @@ def test_logrotate(host):
|
||||
assert cfg_file.exists
|
||||
assert cfg_file.contains('/var/log/ansible/run_all_cron.log')
|
||||
|
||||
|
||||
def test_no_recommends(host):
|
||||
if host.system_info.distribution in ['ubuntu', 'debian']:
|
||||
cfg_file = host.file("/etc/apt/apt.conf.d/95disable-recommends")
|
||||
assert cfg_file.exists
|
||||
|
||||
assert cfg_file.contains('^APT::Install-Recommends "0"')
|
||||
assert cfg_file.contains('^APT::Install-Suggests "0"')
|
||||
|
Loading…
Reference in New Issue
Block a user