freeipa / freeipa.ansible_freeipa / 1.8.4 / module / ipahostgroup Manage FreeIPA hostgroups Authors: Thomas Woerner preview | supported by communityfreeipa.ansible_freeipa.ipahostgroup (1.8.4) — module
Install with ansible-galaxy collection install freeipa.ansible_freeipa:==1.8.4
collections: - name: freeipa.ansible_freeipa version: 1.8.4
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. required: false type: list name: aliases: - cn description: The hostgroup name required: false state: choices: - present - absent - renamed default: present description: State to ensure action: choices: - member - hostgroup default: hostgroup description: Work on hostgroup or member level rename: aliases: - new_name description: - Rename hostgroup to the given name. - Only usable with IPA versions 4.8.7 and up. required: false hostgroup: description: List of hostgroup names assigned to this hostgroup. required: false type: list nomembers: description: Suppress processing of membership attributes required: false type: bool description: description: The hostgroup description required: false 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 ipaadmin_password: description: The admin password. required: false ipaapi_ldap_cache: default: true description: Use LDAP cache for IPA connection. type: bool ipaadmin_principal: default: admin description: The admin principal. membermanager_user: description: - List of member manager users assigned to this hostgroup. - Only usable with IPA versions 4.8.4 and up. 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. required: false type: list