I'm pretty new to Ansible, I am trying to understand how Roles work.
This is my directory structure.
├── custom_role_test_play_book_2.yaml
├── library
│ └── task_two_custom_module.py
└── roles
└── test_role
├── defaults
├── meta
│ └── main.yaml
└── tasks
├── library --> DOES NOT WORK !!
│ └── task_two_custom_module.py
├── main.yaml
├── task1.yaml
└── task2.yaml
main.yaml imports task1.yaml and task2.yaml.
task2.yaml makes use of a custom module named task_two_custom_module.
Here's my question, logically it made sense to me that the module
library/task_two_custom_module should be placed in the same place as the
task book using it i.e. in the same place I've defined task2.yaml.
However it does not seem to work like that, the custom module definitions
are loaded properly only when they are placed in the same directory as the
playbook itself.
I'd like any advice that you can share particularly any nasty gotchas that
I might run into and need to keep in mind when working with custom modules
and roles.
Thanks in advance.
Dhiwakar
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/ccec16e8-6678-4d72-9802-40c661e759d6n%40googlegroups.com.