Kai Stian Olstad [29.06.2016 15:21]:
Yes, that's exactly what happens here. Thank you for pointing me there.
I already thought of using an "absent" and a "present" task, but now I
use the replace module, and it seems to work:
- name: replace kernel multiversions
replace:
dest: /etc/zypp/zypp.conf
regexp: "^multiversion.kernels = latest,latest-1,running"
replace: "multiversion.kernels = latest,oldest,running"
BTW, I'm running ansible version 2.1.0.0, and it's the first time I use
the lineinfile module (since I'm quite new to ansible).
Regards,
Werner
--