- name: insert new line
hosts: testservers
tasks:
- name: insert new line
lineinfile:
path: /var/tmp/test.env
regexp: '^install_dbpaas'
insertafter: '############ file system section'
line: "DEV[${#DEV[@]}+1]=testserver-data:/var_bin FS[${#DEV[@]}]=/test MNT[${#DEV[@]}]=rw,hard
state: present
- name: insert new line
hosts: testservers
tasks:
- name: insert new line
lineinfile:
path: /var/tmp/test.env
regexp: '^install_dbpaas'
insertafter: '############ file system section'
line: "DEV[${#DEV[@]}+1]=testserver-data:/var_bin FS[${#DEV[@]}]=/test MNT[${#DEV[@]}]=rw,hard
state: present