remove_* was recently changed to always place empty file, but just set perms if not present, without replace. Do the same with that option.master
{% set clean_apt_conf_d = salt['pillar.get']('apt:clean_apt_conf_d', apt_map.clean_apt_conf_d) %} | {% set clean_apt_conf_d = salt['pillar.get']('apt:clean_apt_conf_d', apt_map.clean_apt_conf_d) %} | ||||
{% set apt_conf_d = salt['pillar.get']('apt:apt_conf_d', apt_map.apt_conf_d) %} | {% set apt_conf_d = salt['pillar.get']('apt:apt_conf_d', apt_map.apt_conf_d) %} | ||||
{% if remove_apt_conf %} | |||||
/etc/apt/apt.conf: | /etc/apt/apt.conf: | ||||
file: | |||||
- absent | |||||
{% endif %} | |||||
file.managed: | |||||
- mode: '0644' | |||||
- user: root | |||||
- group: root | |||||
{% if remove_apt_conf %} | |||||
- contents: '' | |||||
- contents_newline: False | |||||
{% else %} | |||||
- replace: False | |||||
{% endif %} | |||||
{{ confd_dir }}: | {{ confd_dir }}: | ||||
file.directory: | file.directory: |