Reputation: 51
I am developing an a Ansible module for compile sources, like
- source_compile:
archive: /var/cache/sources/nginx.tar.gz
configure:
prefix: /usr
I will probably
So I want use ansible core module get_url and unarchive and shell, But no found how.
Upvotes: 3
Views: 2809
Reputation: 68269
You can execute other modules only from action plugin, not from module itself.
It's done with _execute_module
helper function. See template action for example.
Also you may be interested in using other helper functions such as fetch_url
to retrieve remote data and _low_level_execute_command
to run shell commands instead of calling other modules.
I'd recommend inspecting Ansible core modules/actions sources code to get the idea of how things work.
Upvotes: 6