<p>There is no tool in Ansible to authorize a user to execute selected commands or tags only.</p>

<p>It seems a good idea to use sudo to authorize <a href="https://superuser.com/questions/767415/limit-user-to-execute-selective-commands-linux">user to execute selective commands</a>.</p>

CC BY-SA 4.0
2019-05-08T03:54:02.417Z
2019-05-08T03:59:33.380Z
2019-05-08T03:59:33.380Z
Vladimir Botka
<p>for example, I have a tag named 'installagent' and i want to run this command <code>ansible -playbook -i /path  agent.yml --tags installagent</code> from another server via ssh on my Ansible server with user 'testusr'. what should i do?  </p>

<p>can i limit 'testusr' to only use specific tags?<br>
( I read somewhere that i should give <code>sudo</code> permission to that user. if its true what should i do if i don't want to give <code>sudo</code> permission?)</p>

<ansible><linux><permissions>
how to give a user privilege to run Ansible commands or just an specific tag?
BlackCrystal
# how to give a user privilege to run Ansible commands or just an specific tag?

(Asked by: username_0 on 2019-05-08)

for example, I have a tag named 'installagent' and i want to run this command `ansible -playbook -i /path agent.yml --tags installagent` from another server via ssh on my Ansible server with user 'testusr'. what should i do?

can i limit 'testusr' to only use specific tags?  
( I read somewhere that i should give `sudo` permission to that user. if its true what should i do if i don't want to give `sudo` permission?)

**Tags:** ansible, linux, permissions


---

## 1 answers

### Answer by username_1 on 2019-05-08. Score: 0 | Accepted answer

There is no tool in Ansible to authorize a user to execute selected commands or tags only.

It seems a good idea to use sudo to authorize [user to execute selective commands](https://superuser.com/questions/767415/limit-user-to-execute-selective-commands-linux).


---

