Add module_utils example next to library examples (#25390)

This commit is contained in:
Toshio Kuratomi 2017-07-18 17:09:32 -07:00 committed by GitHub
parent 636f8737c9
commit 37e757286d

View file

@ -37,6 +37,7 @@ The top level of the directory would contain files and directories like so::
hostname2 # "" hostname2 # ""
library/ # if any custom modules, put them here (optional) library/ # if any custom modules, put them here (optional)
module_utils/ # if any custom module_utils to support modules, put them here (optional)
filter_plugins/ # if any custom filter plugins, put them here (optional) filter_plugins/ # if any custom filter plugins, put them here (optional)
site.yml # master playbook site.yml # master playbook
@ -61,6 +62,7 @@ The top level of the directory would contain files and directories like so::
meta/ # meta/ #
main.yml # <-- role dependencies main.yml # <-- role dependencies
library/ # roles can also include custom modules library/ # roles can also include custom modules
module_utils/ # roles can also include custom module_utils
lookup_plugins/ # or other types of plugins, like lookup in this case lookup_plugins/ # or other types of plugins, like lookup in this case
webtier/ # same kind of structure as "common" was above, done for the webtier role webtier/ # same kind of structure as "common" was above, done for the webtier role
@ -96,6 +98,7 @@ Alternatively you can put each inventory file with its ``group_vars``/``host_var
stagehost2 # "" stagehost2 # ""
library/ library/
module_utils/
filter_plugins/ filter_plugins/
site.yml site.yml
@ -421,7 +424,7 @@ This will pull in variables based on the OS name.
Bundling Ansible Modules With Playbooks Bundling Ansible Modules With Playbooks
+++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++
If a playbook has a "./library" directory relative to its YAML file, this directory can be used to add ansible modules that will If a playbook has a :file:`./library` directory relative to its YAML file, this directory can be used to add ansible modules that will
automatically be in the ansible module path. This is a great way to keep modules that go with a playbook together. This is shown automatically be in the ansible module path. This is a great way to keep modules that go with a playbook together. This is shown
in the directory structure example at the start of this section. in the directory structure example at the start of this section.