I have the below task in ansible, but when I take a look at the process 
using `ps aux | grep nginx`, I see that the process is being run by the 
root user instead of the nginx user is there a way I can fix this.


- name: Install Nginx Ubuntu
hosts: all
remote_user: "{{ NGINX_USER }}"
become: yes
become_method: sudo
gather_facts: no
connection: ssh
vars_files:
- ../vars/global.yaml
tasks:
- name: Start NGINX
become: true
become_user: "{{ NGINX_USER }}"
become_method: sudo
systemd:
state: started
name: nginx

-- 
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-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/96ce3613-6d7f-4ddb-8667-fba44494490f%40googlegroups.com.

Reply via email to