I create a simple playbook to restart rsyslog using service module.
---
- hosts: remote
remote_user: root
gather_facts: true
tasks:
- name: restart rsyslog
service: name=rsyslog state=restarted
sudo: yes
sudo_user:root
After I touched an empty ansible.cfg in current directory,
I executed ansible-playbook rsyslog.yml --ask-become-pass and it returned
a failed message
failed: [127.0.0.1] => {"failed": true}
FATAL: all hosts have already failed -- aborting
But when I remove ansible.cfg , rsyslog was restarted normally.
If I changed rsyslog to nginx or mysql , thare was no such problem.
Anyone got a clue ??
--
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/9c4a8e25-4acb-41ad-bbd9-a0f1496095f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.