[ansible-project] library/module_utils functionality question

2018-02-13 Thread Arthur Reyes
Follow-up. I tested copying a module from core into the playbook library. 
Modifying the content, without altering the module name and observed that 
ansible.library picked up the local module first.

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/bf35e3a0-ce5f-497e-af77-21bd60acfd91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] library/module_utils functionality question

2018-02-13 Thread Arthur Reyes
If a module with the same name as a core module exists in the ./library or 
./module_utils directory of the plabyook, which module will be get invoked 
when I reference it in my playbook?

I have a need to modify the functionality of a core module. I could 
refactor/rename it to [module]_internal or simply copy the module to 
./library and add the needed functionality, so I'm curious how others have 
approached this. I see benefits of creating a new (renamed) module with the 
added functionality and refactoring my playbook to invoke this module 
instead, but there's other benefits to just slipping the modified module 
directly into the ./library directory so that no further changes are 
required in the playbook.

Thoughts?

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/dc48af50-c7a2-4913-8514-7d72f0b2848e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.