Vijay_R
(Vijay R)
September 13, 2017, 9:52pm
1
Whether notify doesn’t come under lineinfile module? - is that a mistake, I have committed. Is there any other way or I can use one more name, shell module under the lineinfile to start the service?
roles/conf/tasks/main.yml
`
lineinfile:
path: /etc/cdsw/config/cdsw.conf
regexp: ‘^NO_PROXY’
line: ‘NO_PROXY=“{{host_ip}},127.0.0.1,100.66.0.1,100.66.0.2,100.66.0.3,100.66.0.4,100.66.0.5,100.66.0.6,100.66.0.7,100.66.0.8,100.66.0.9,100.66.0.10,100.66.0.11,100.66.0.12,100.66.0.13,100.66.0.14,100.66.0.15,100.66.0.16,100.66.0.17,100.66.0.18,100.66.0.19,100.66.0.20,100.66.0.21,100.66.0.22,100.66.0.23,100.66.0.24,100.66.0.25,100.66.0.26,100.66.0.27,100.66.0.28,100.66.0.29,100.66.0.30,100.66.0.31,100.66.0.32,100.66.0.33,100.66.0.34,100.66.0.35,100.66.0.36,100.66.0.37,100.66.0.38,100.66.0.39,100.66.0.40,100.66.0.41,100.66.0.42,100.66.0.43,100.66.0.44,100.66.0.45,100.66.0.46,100.66.0.47,100.66.0.48,100.66.0.49,100.66.0.50”’
notify: CDSW initialization
`
John_Harmon
(John Harmon)
September 13, 2017, 10:33pm
2
I could be wrong as I am still new to ansible, but I believe you are just indented too far. It should be at the same level as lineinfile, not a sub of it
Enter co
lineinfile:
path: /etc/cdsw/config/cdsw.conf
regexp: ‘^NO_PROXY’
line: ‘NO_PROXY=“{{host_ip}},127.0.0.1,100.66.0.1,100.66.0.2,100.66.0.3,100.66.0.4,100.66.0.5,100.66.0.6,100.66.0.7,100.66.0.8,100.66.0.9,100.66.0.10,100.66.0.11,100.66.0.12,100.66.0.13,100.66.0.14,100.66.0.15,100.66.0.16,100.66.0.17,100.66.0.18,100.66.0.19,100.66.0.20,100.66.0.21,100.66.0.22,100.66.0.23,100.66.0.24,100.66.0.25,100.66.0.26,100.66.0.27,100.66.0.28,100.66.0.29,100.66.0.30,100.66.0.31,100.66.0.32,100.66.0.33,100.66.0.34,100.66.0.35,100.66.0.36,100.66.0.37,100.66.0.38,100.66.0.39,100.66.0.40,100.66.0.41,100.66.0.42,100.66.0.43,100.66.0.44,100.66.0.45,100.66.0.46,100.66.0.47,100.66.0.48,100.66.0.49,100.66.0.50”’
notify: CDSW initialization
de here...
system
(system)
September 14, 2017, 7:16pm
3
John Harmon is correct, you have it as an option of lineinfile, but it
is really a task keyword and should be unindented for it to work
properly.