Searching the role path when developing a module

20 views
Skip to first unread message

Andrew Cholakian

unread,
Mar 13, 2014, 9:01:50 PM3/13/14
to ansible...@googlegroups.com
Hi, i'm currently writing a module that takes a directory of configuration files as an argument. What would I need to do to have it take an argument 'foo', and find it at either ansible_base_dir/foo and ansible_base_dir/roles/rolename/foo

Michael DeHaan

unread,
Mar 14, 2014, 10:32:53 AM3/14/14
to ansible...@googlegroups.com
I assume you mean an action plugin?   (as basic modules don't take files as inputs)

This is the path_dwim stuff that all the other modules do, you might want to look at something like "action_plugins/copy" for reference.




On Thu, Mar 13, 2014 at 9:01 PM, Andrew Cholakian <andr...@gmail.com> wrote:
Hi, i'm currently writing a module that takes a directory of configuration files as an argument. What would I need to do to have it take an argument 'foo', and find it at either ansible_base_dir/foo and ansible_base_dir/roles/rolename/foo

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/198d90a6-345a-47ed-a293-5f6b6f304381%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages