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