- Sep 02, 2021
-
-
Rafael Guterres Jeffman authored
Use IPAAnsibleModule methods and ipamodule_base_docs ducument fragment.
-
Rafael Guterres Jeffman authored
Use IPAAnsibleModule methods and ipamodule_base_docs ducument fragment.
-
Rafael Guterres Jeffman authored
By making IPAAnsibleModule the base class of FreeIPABaseModule, instead of AnsibleModule, some methods on FreeIPABaseModule can be removed and suport for commom parameters in modules using the older class can use the same commom parameters (ipaadmin_principal and ipaadmin_password) as the other parameters. This will also allow easier deprecation of FreeIPABaseModule, which is hard to maintain. To be able to use IPAAnsibleModule as the base class, it was moved within the file, to position before FreeIPABaseModule declaration. This patch also modifies IPAAnsibleModule by: * removing usage of `self` in methods not requiring it, turning the methods into @statimethod; * adding comments to all the methods in IPAAnsibleModule, which makes it easier to understand what the individual methods do, and what their parameters represent.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
- Sep 01, 2021
-
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
ipaadmin_variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module.
-
Thomas Woerner authored
Use IPAAnsibleModule and ipamodule_base_docs in the templates of utils/new_module. ipaadmin_password lines in the examples have been added, ipaadmin_ variables are handled by IPAAnsibleModule, ansible_module.params_get is used to get the parameters and ansible_module.ipa_connect is used to simplify the module. ipamodule+member.py.in is additionally using gen_add_list and gen_intersection_list to reduce the command calls to the changes only.
-
Thomas Woerner authored
This class is an extended version of the Ansible Module that provides IPA specific methods to simplify module generation. Simple example: from ansible.module_utils.ansible_freeipa_module import \ IPAAnsibleModule def main(): ansible_module = IPAAnsibleModule( argument_spec=dict( name=dict(type="str", aliases=["cn"], default=None), state=dict(type="str", default="present", choices=["present", "absent"]), ), ) # Get parameters name = ansible_module.params_get("name") state = ansible_module.params_get("state") # Connect to IPA API with ansible_module.ipa_connect(): # Execute command if state == "present": ansible_module.ipa_command(["command_add", name, {}]) else: ansible_module.ipa_command(["command_del", name, {}]) # Done ansible_module.exit_json(changed=True) if __name__ == "__main__": main()
-
Thomas Woerner authored
pylint: Upgrade to version 2.10.2.
-
Rafael Guterres Jeffman authored
This PR sets pylint to version 2.10.2 in all linter actions, and fixes code in plugins so that this version new checks are either satisfied or ignored if needed.
-
Thomas Woerner authored
ipapermission: Add 'new_name' as an alias to 'rename'.
-
Thomas Woerner authored
build_containers: build CI container images on Sundays.
-
Thomas Woerner authored
tests/trust: Add ipaadmin_password to test playbooks.
-
Thomas Woerner authored
Use Ansible fact "os_family" as fallback, when distro is not directly suppported.
-
- Aug 31, 2021
-
-
Rafael Guterres Jeffman authored
When loading variables in all ansible-freeipa roles, it is expected that a file with these variables is present for each supported Linux distribution, and then, based on the information about the distribution provided by Ansible, the correct file is loaded. Previously, only the facts `distribution` and dinstribution version related facts were used, which required specific files, or links to files for distributions in the same "family", which will probably have the same variables set. This change adds searching for files based on the `os_family` fact, allowing distributions that follow the same family rules to be supported, without any changes to the codebase. It is still possible that a specific distribution configuration overrides the default behavior, as `os_family` has lower priority than `distribution`. For example, distributions on the `RedHat` family, like Oracle Linux, Alma Linux, and Rocky Linux, work withoutadding new files, or links to files, to fill the `vars`. Fix issue #573. Fix issue #523.
-
Rafael Guterres Jeffman authored
When loading variables in all ansible-freeipa roles, it is expected that a file with these variables is present for each supported Linux distribution, and then, based on the information about the distribution provided by Ansible, the correct file is loaded. Previously, only the facts `distribution` and dinstribution version related facts were used, which required specific files, or links to files for distributions in the same "family", which will probably have the same variables set. This change adds searching for files based on the `os_family` fact, allowing distributions that follow the same family rules to be supported, without any changes to the codebase. It is still possible that a specific distribution configuration overrides the default behavior, as `os_family` has lower priority than `distribution`. For example, distributions on the `RedHat` family, like Oracle Linux, Alma Linux, and Rocky Linux, work withoutadding new files, or links to files, to fill the `vars`. Fix issue #573. Fix issue #523.
-