freeipa / freeipa.ansible_freeipa / 1.12.1 / module / ipahostgroup Manage FreeIPA hostgroups Authors: Thomas Woerner (@t-woerner) preview | supported by communityfreeipa.ansible_freeipa.ipahostgroup (1.12.1) — module
Install with ansible-galaxy collection install freeipa.ansible_freeipa:==1.12.1
collections: - name: freeipa.ansible_freeipa version: 1.12.1
Manage FreeIPA hostgroups
# Ensure host-group databases is present - freeipa.ansible_freeipa.ipahostgroup: ipaadmin_password: SomeADMINpassword name: databases host: - db.example.com hostgroup: - mysql-server - oracle-server
# Ensure hosts and hostgroups are present in existing databases hostgroup - freeipa.ansible_freeipa.ipahostgroup: ipaadmin_password: SomeADMINpassword name: databases host: - db.example.com hostgroup: - mysql-server - oracle-server action: member
# Ensure hosts and hostgroups are absent in databases hostgroup - freeipa.ansible_freeipa.ipahostgroup: ipaadmin_password: SomeADMINpassword name: databases host: - db.example.com hostgroup: - mysql-server - oracle-server action: member state: absent
# Rename hostgroup - freeipa.ansible_freeipa.ipahostgroup: ipaadmin_password: SomeADMINpassword name: databases rename: datalake
# Ensure host-group databases is absent - freeipa.ansible_freeipa.ipahostgroup: ipaadmin_password: SomeADMINpassword name: databases state: absent
host: description: List of host names assigned to this hostgroup. elements: str required: false type: list name: aliases: - cn description: The hostgroup name elements: str required: true type: list state: choices: - present - absent - renamed default: present description: State to ensure type: str action: choices: - member - hostgroup default: hostgroup description: Work on hostgroup or member level type: str rename: aliases: - new_name description: - Rename hostgroup to the given name. - Only usable with IPA versions 4.8.7 and up. required: false type: str hostgroup: description: List of hostgroup names assigned to this hostgroup. elements: str required: false type: list nomembers: description: Suppress processing of membership attributes required: false type: bool description: description: The hostgroup description required: false type: str ipaapi_context: choices: - server - client description: 'The context in which the module will execute. Executing in a server context is preferred. If not provided context will be determined by the execution environment. ' required: false type: str ipaadmin_password: description: The admin password. required: false type: str ipaapi_ldap_cache: default: true description: Use LDAP cache for IPA connection. type: bool ipaadmin_principal: default: admin description: The admin principal. type: str membermanager_user: description: - List of member manager users assigned to this hostgroup. - Only usable with IPA versions 4.8.4 and up. elements: str required: false type: list membermanager_group: description: - List of member manager groups assigned to this hostgroup. - Only usable with IPA versions 4.8.4 and up. elements: str required: false type: list