Use pfexec instead of sudo

251 views
Skip to first unread message

Paul Wolstenholme

unread,
Jan 31, 2014, 6:19:05 PM1/31/14
to ansible...@googlegroups.com
Is it possible to specify pfexec instead of sudo in a playbook. Something like:

sudo_command: pfexec
or
root_command: pfexec


Cheers,
Paul



Brian Coca

unread,
Jan 31, 2014, 6:23:43 PM1/31/14
to ansible...@googlegroups.com
If pfexec can take same command line arguments as sudo, use ANSIBLE_SUDO_EXE env variable or sudo_exe entry in ansible .cfg to point to it.

Paul Wolstenholme

unread,
Jan 31, 2014, 6:45:03 PM1/31/14
to ansible...@googlegroups.com
Thanks Brian. I'll give that a try. Although, I would like to use both. We have both linux and smartos boxes we would like to do specify within the context of a playbook or inventory file. sudo will work on Smartos but pfexec seems to be prefered in the Solaris world. 

Cheers,
Paul


On Fri, Jan 31, 2014 at 3:23 PM, Brian Coca <bria...@gmail.com> wrote:
If pfexec can take same command line arguments as sudo, use ANSIBLE_SUDO_EXE env variable or sudo_exe entry in ansible .cfg to point to it.

--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/04ASAiptbzU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--

Paul Wolstenholme
CBC Music - System Administrator
CBC  Vancouver
604.662.6632

Michael DeHaan

unread,
Jan 31, 2014, 6:52:07 PM1/31/14
to ansible...@googlegroups.com
It's currently not configurable on a per inventory variable basis, but patches to add a ansible_sudo_exe parameter would be considered for sure.




--
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-proje...@googlegroups.com.

To post to this group, send email to ansible...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Michael DeHaan <mic...@ansible.com>
CTO, Ansible, Inc.
http://www.ansible.com/

Preston Marshall

unread,
Feb 12, 2015, 4:40:14 PM2/12/15
to ansible...@googlegroups.com
Did you ever solve this Paul? I am struggling with the same issue.

Paul Wolstenholme

unread,
Feb 13, 2015, 2:17:40 PM2/13/15
to ansible...@googlegroups.com
No. As much as I prefer rbac and pfexec, I just started using sudo. There is a hard-coded switch (-Z|z) that messes it up. 

I do want to revisit the issue but I haven't had time.

Cheers,
Paul

Reply all
Reply to author
Forward
0 new messages