Skip to content

Commit de05ac6

Browse files
author
Adrien "ze" Urban
committed
apt_conf: remove_* consistent with other similar options
remove_* was recently changed to always place empty file, but just set perms if not present, without replace. Do the same with that option.
1 parent 5c6c531 commit de05ac6

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

apt/apt_conf.sls

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@
44
{% set clean_apt_conf_d = salt['pillar.get']('apt:clean_apt_conf_d', apt_map.clean_apt_conf_d) %}
55
{% set apt_conf_d = salt['pillar.get']('apt:apt_conf_d', apt_map.apt_conf_d) %}
66
7-
{% if remove_apt_conf %}
87
/etc/apt/apt.conf:
9-
file:
10-
- absent
11-
{% endif %}
8+
file.managed:
9+
- mode: '0644'
10+
- user: root
11+
- group: root
12+
{% if remove_apt_conf %}
13+
- contents: ''
14+
- contents_newline: False
15+
{% else %}
16+
- replace: False
17+
{% endif %}
1218
1319
{{ confd_dir }}:
1420
file.directory:

0 commit comments

Comments
 (0)