Le 2019-02-08 17:16, [email protected] a écrit :
Hi,

When i use service in ansible same this task :

- name: "stop nginx"
  service:
      name: nginx
      state: 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 ! :)

Did you put become_user to root when you try with become: yes ?

Regards,

JYL

--
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/ba2aff59c95ab99045af87a3d7bf5449%40lenhof.eu.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to