Ansible add a line in file - Stack Overflow
https://stackoverflow.com/questions/5680151727.06.2019 · I am trying to add a new line in a file through ansible lineinfile module. Below is the task defined in the playbook. lineinfile: path: /etc/httpd/file.conf. line: myfilecontent. It works fine and add a new line in the file. But when i modify the line content to some another value i.e mynewfilecontent it adds another line instead of updating it.
Ansible add a line in file - Stack Overflow
stackoverflow.com › questions › 56801517Jun 28, 2019 · I am trying to add a new line in a file through ansible lineinfile module. Below is the task defined in the playbook. lineinfile: path: /etc/httpd/file.conf. line: myfilecontent. It works fine and add a new line in the file. But when i modify the line content to some another value i.e mynewfilecontent it adds another line instead of updating it.