mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-08 14:23:11 +00:00
New ipamodule_base_vars
There are common parameters in all modules like ipaadmin_principal and ipaadmin_password. As this list of common parameters will be extended soon, there is a need to reduce the code and documentation duplicates. A ModuleDocFragment is added to provide the module documentation for the common parameters. This is used in the modules with extends_documentation_fragment. ansible_freeipa_module has additional ipamodule_base_spec and get_ipamodule_base_vars. ipamodule_base_spec extends argument_spec in the module and get_ipamodule_base_vars is used to return a dict containing the common parameters.
This commit is contained in:
@@ -30,9 +30,11 @@ import subprocess
|
||||
def run_ansible_doc(role, module, verbose=False):
|
||||
playbook_dir, module_path = get_playbook_dir(role, module)
|
||||
module_dir = os.path.dirname(module_path)
|
||||
doc_fragments = os.path.dirname(module_path)+"/../doc_fragments/"
|
||||
|
||||
command = ["env",
|
||||
"ANSIBLE_LIBRARY=%s" % module_dir,
|
||||
"ANSIBLE_DOC_FRAGMENT_PLUGINS=%s" % doc_fragments,
|
||||
"ansible-doc",
|
||||
"--playbook-dir=%s" % playbook_dir,
|
||||
"--type=module",
|
||||
|
||||
Reference in New Issue
Block a user