Become plugin

32 views
Skip to first unread message

Torrpenn356

unread,
Oct 2, 2019, 3:58:02 AM10/2/19
to Ansible Development
Hello,
I hope, I am posting my question on the right group, if not, please tell me
I need to use a dedicated become method and want to know, if it is possible, or, if only the "official" ones are authorized.
If it is possible, is there specific guidelines to follow to develop my own become plugin
Thanks and regards
R

Michael Barber

unread,
Feb 12, 2020, 2:28:01 PM2/12/20
to Ansible Development
Here are the official docs...but, I am unable to find anything specific to "become" plugin development.

Sam Doran

unread,
Feb 13, 2020, 3:11:32 PM2/13/20
to Ansible Development
We unfortunately don't have docs specific to developing become plugins. They are pretty straightforward compared to other plugin types, though. I would recommend looking at the existing become plugins to get an idea of how to write you own. You can ask development questions here or on Freennode IRC in #ansible-devel.

---

Respectfully,

Sam Doran

zoo...@gmail.com

unread,
Feb 13, 2020, 3:45:39 PM2/13/20
to Sam Doran, Ansible Development

Excellent. Thank you.

 

I did copy and then edit the sudo one to meet my needs I believe, unfortunately my unfamiliarity with ansible has me at a loss for how to correctly make it accessible to the playbook.

 

I placed it here “/usr/share/ansible/plugins/”

And added this to my ansible config:  ANSIBLE_LIBRARY=$ANSIBLE_LIBRARY:/usr/share/ansible/plugins

 

-bash-4.2$ ls -l /usr/share/ansible/plugins/suexec.py

-rw-r--r--. 1 root root 3526 Feb 12 14:40 /usr/share/ansible/plugins/suexec.py

 

This is what the ansible developer docs suggested or at least was one of the suggestions. I clearly missed something though.

 

TASK [Gathering Facts] ************************************************************************************************************************

fatal: [desktop]: FAILED! => {"msg": "Privilege escalation method not found: suexec"}

 

 

Any guidance is greatly appreciated.  Thank you.

--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-devel/bKVxmo_5a6M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-deve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/2B3301DB-DF9D-40AA-A6C5-B89B22F36FEB%40redhat.com.

Brian Coca

unread,
Mar 30, 2020, 1:45:12 PM3/30/20
to zoo...@gmail.com, Sam Doran, Ansible Development
It needs a specific subdir for each plugin type, otherwise there would
be name conflicts across plugins.

See https://docs.ansible.com/ansible/latest/dev_guide/developing_locally.html#local-plugins




--
----------
Brian Coca

Pradeep Tiwari

unread,
Apr 19, 2020, 3:11:04 PM4/19/20
to Ansible Development
Hi,

Could you please confirm if it is working for you. Please share the code if it is working along with instructions. Thank you.

Reply all
Reply to author
Forward
0 new messages