- name: set ypserver to localhost
lineinfile:
dest: /etc/yp.conf
create: yes
state: present
backup: yes
backrefs: yes
regexp: "^ypserver .*"
line: "ypserver 127.0.0.1"
notify: restart ypservicesTASK [nismaster : set ypserver to localhost] ***********************************
fatal: [octans]: FAILED! => {"changed": false, "failed": true, "msg": "path /etc/yp.conf does not exist", "path": "/etc/yp.conf", "state": "absent"}