evolinux-base: apt/listchanges with lineinfile

Ansible < 2.1 puts an extra space around "="
It might be a problem for APT.

Until we can use Ansible >= 2.1 we use lineinfile instead
even if it less precise (doesn't manage sections)
This commit is contained in:
Jérémy Lecour 2016-12-27 14:44:34 +01:00 committed by Jérémy Lecour
parent 4b9d5bf6fd
commit b2c6847019

View file

@ -49,12 +49,13 @@
backup: yes
mode: 0640
# TODO: use ini_file when Ansible > 2.1 (no_extra_spaces: yes)
- name: Configure Listchanges
ini_file:
lineinfile:
dest: /etc/apt/listchanges.conf
section: apt
option: "{{ item.option }}"
value: "{{ item.value }}"
regexp: '^{{ item.option }}\s*='
line: "{{ item.option }}={{ item.value }}"
with_items:
- { option: "confirm", value: "1" }
- { option: "which", value: "both" }