Skip to content

linuxfabrik.lfops.ipahostgroup

Manage FreeIPA hostgroups

Synopsis

  • Manage FreeIPA hostgroups

Available since LFOps 6.0.0.

Mandatory Parameters

name

  • The hostgroup name
  • Type: List.

Optional Parameters

action

  • Work on hostgroup or member level
  • Type: String. One of member, hostgroup.
  • Default: hostgroup

description

  • The hostgroup description
  • Type: String.

host

  • List of host names assigned to this hostgroup.
  • Type: List.

hostgroup

  • List of hostgroup names assigned to this hostgroup.
  • Type: List.

membermanager_group

  • List of member manager groups assigned to this hostgroup. Only usable with IPA versions 4.8.4 and up.
  • Type: List.

membermanager_user

  • List of member manager users assigned to this hostgroup. Only usable with IPA versions 4.8.4 and up.
  • Type: List.

nomembers

  • Suppress processing of membership attributes
  • Type: Bool.

rename

  • Rename hostgroup to the given name. Only usable with IPA versions 4.8.7 and up.
  • Type: String.

state

  • State to ensure
  • Type: String. One of present, absent, renamed.
  • Default: present

Examples

# Ensure host-group databases is present
- 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
- 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
- ipahostgroup:
    ipaadmin_password: SomeADMINpassword
    name: databases
    host:
    - db.example.com
    hostgroup:
    - mysql-server
    - oracle-server
    action: member
    state: absent

# Rename hostgroup
- ipahostgroup:
    ipaadmin_password: SomeADMINpassword
    name: databases
    rename: datalake

# Ensure host-group databases is absent
- ipahostgroup:
    ipaadmin_password: SomeADMINpassword
    name: databases
    state: absent

Authors

  • Thomas Woerner (@t-woerner)