Hi all,
I'm using Ansible with CentOS 7 images in Vagrant.
I have the following task:
- name: restart iptables
action: service name=iptables state=restarted
when: is_centos
When it is run on the images, I get:
failed: [slave0] => {"failed": true, "parsed": false}
SUDO-SUCCESS-vukmjpqjkiplzemawuntmvtspyydtpot
{"msg": "[Errno 2] No such file or directory", "failed": true, "cmd":
"initctl version", "rc": 2}
{"msg": "[Errno 2] No such file or directory", "failed": true, "cmd": "None
show None", "rc": 2}
CentOS 6 used upstart (initctl) but CentOS 7 uses systemd (systemctl). I'm
not sure why Ansible is picking the wrong method. I'm using Ansible 1.8.2
(from the CentOS RPMs.).
Has anyone seen anything like this? Any tips on getting Ansible to
identify the right service method?
Thanks,
RJ
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/8f9bc7e7-19f2-41a2-a5bd-6f8499f12a7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.