mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-27 05:43:05 +00:00
With 4.9.10, the value of bools have been changed from "TRUE" and "FALSE" to real bool values. With IPA < 4.9.10 the new bool checks distcheck and usercheck failed the tests for enabling the checks with a "already enabled" error. A new version check altogether with providing the ansible module for gen_args has been added. The values True and False are now transformed into "TRUE" and "FALSE" for IPA < 4.9.10. The function bool_param has been renamed to bool_or_empty_param to match the int_or_empty_param and to have a more explaining name.
Writing a new Ansible FreeIPA module
A ansible-freeipa module should have:
-
Code:
- A module file placed in
plugins/modules/<ipa_module_name>.py
- A module file placed in
-
Documentation:
README-<module_name>.mdfile in the root directory and linked from the main README.md- Example playbooks in
playbooks/<module_name>/directory
-
Tests:
- Test cases (also playbooks) defined in
tests/<module_name>/test_<something>.yml. It's ok to have multiple files in this directory.
- Test cases (also playbooks) defined in
Use the script utils/new_module to create the stub files for a new module.