Ansible lineinfile duplicates line

后端 未结 3 1155
無奈伤痛
無奈伤痛 2021-02-01 02:00

I have a simple file at /etc/foo.txt. The file contains the following:

#bar

I have the following ansible playbook task to uncomment the line ab

3条回答
  •  無奈伤痛
    2021-02-01 02:44

    See https://github.com/ansible/ansible/issues/4531.

    The solution is to not replace the commented out line, but to add an additional line, while keeping the original there.

提交回复
热议问题