So,
When I run my playbook with this task :
- name: "stop nginx"service:name: nginxstate: stopped
I have this message :
changed: [edeefreffe] => {"changed": true, "msg": "Service nginx not found on host, assuming it will exist on full run"}
What happens when you use:
but with this command ansible it's work :
- name: "Arret du nginx"command: sudo systemctl stop nginx
Someone have a answer please ??!
Thanks you very much !! :)
Le vendredi 8 février 2019 17:16:59 UTC+1, ryad9...@gmail.com a écrit :Hi,
When i use service in ansible same this task :
- name: "stop nginx"service:name: nginxstate: stopped
Same with "become: yes" and "pattern: my_pattern_file"
but with line "command: sudo systemctl stop nginx" it's working !! WHY ?
Thanks you for you answers guy ! :)
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/35f9bd5f-5743-417f-b449-905e092828a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
What happens when you use:
changed: [edeefreffe] => {"changed": true, "msg": "Service nginx not found on host, assuming it will exist on full run"}
New probleme:
When i run this task it's works :
- name: "stopper nginx"systemd:name: /my_pattern/nginxstate: stopped
But there is a warning message:
[WARNING]: The service (my_pattern/nginx) is actually an init script but the system ismanaged by systemd
It's normaly ?
Why did you change
name: nginx
to /my_pattern/nginx
?
Sudheer Satyanarayana