Hi All,
lineinfile duplicates the entry... I am trying to append a line based on the regex... but if i run the playbook again, it keeps adding the lines...
- name: "Updating /etc/default/grub with security parameters"
lineinfile:
path: /etc/default/grub_new
backrefs: yes
state: present
regexp: '(^GRUB_CMDLINE_LINUX_DEFAULT=.*)$'
line: '\1\nnuma_balancing=disable'
I tried the same with replace module, still got the same result.. Not sure what am i missing here