# ansible on Ubuntu

**URL:** <https://forum.ansible.com/t/ansible-on-ubuntu/23167>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [December 3, 2016, 10:21am UTC](https://forum.ansible.com/t/ansible-on-ubuntu/23167 "2016-12-03T10:21:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Li](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@Jason\_Li](https://forum.ansible.com/u/Jason_Li)\
**Post date:** [December 3, 2016, 10:21am UTC](https://forum.ansible.com/t/ansible-on-ubuntu/23167/1 "2016-12-03T10:21:59Z")

</div>

Hi Support,

I’m new for ansible and Linux, may I know, as Ubuntu disabled ‘root’ account, but when we install system, the permission was grant to ‘root’ as well, like ‘/etc/’…

I’m facing the problem when create /etc/nginx/nginx.conf’, I’m continue getting ‘permission denied’ error.

I’ve copied the ssh key to ‘ubuntu’ account, and below is the playbook, I used -K to input the password as well.

- name: test playbook  
hosts: webservers  
tasks:

- name: debug  
debug: msg=“{{ group\_names }}, {{ ansible\_processor\_cores }}”

- name: create nginx config directory  
file: path=/etc/nginx state=directory mode=0755  
become: sudo

“msg”: “There was an issue creating /etc/nginx as requested: [Errno 13] Permission denied: ‘/etc/nginx’”

Can someone help for that.

Thanks.  
Best Regards,  
Jason

---

<div class="post-metadata">

**Author:** ![Rodney\_Quillo](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@Rodney\_Quillo](https://forum.ansible.com/u/Rodney_Quillo)\
**Post date:** [December 5, 2016, 7:23am UTC](https://forum.ansible.com/t/ansible-on-ubuntu/23167/2 "2016-12-05T07:23:55Z")

</div>

Hmm, looks like the ‘become:sudo’ is something that makes permission denied.  
It must be something like:

…  
become: true  
…

See [http://docs.ansible.com/ansible/become.html](http://docs.ansible.com/ansible/become.html)
