user3265317
user3265317

Reputation: 166

Ansible run commands with sudo but don't become root

I have a use case where I don't want the user executing the ansible commands to become root but I do want them to use sudo to do the commands.

probably not possible but i can't find anything that says one way or the other

Upvotes: 0

Views: 252

Answers (1)

hymie
hymie

Reputation: 2068

sudo allows you to specify which commands a given user or group of users is allowed to run as root . For example, my backuppc account can only run two commands as root:

backuppc ALL=(root) /usr/bin/rsync,/sbin/e2label

Upvotes: 1

Related Questions