W3cubDocs

/Ansible

ipa_group - Manage FreeIPA group

New in version 2.3.

Synopsis

  • Add, modify and delete group within IPA server

Options

parameter required default choices comments
cn
yes
Canonical name.
Can not be changed as it is the unique identifier.
aliases: name
external
no
Allow adding external non-IPA members from trusted domains.
gidnumber
no
GID (use this option to set it manually).
group
no
List of group names assigned to this group.
If an empty list is passed all groups will be removed from this group.
If option is omitted assigned groups will not be checked or changed.
Groups that are already assigned but not passed will be removed.
ipa_host
no ipa.example.com
IP or hostname of IPA server
ipa_pass
yes
Password of administrative user
ipa_port
no 443
Port of IPA server
ipa_prot
no https
  • http
  • https
Protocol used by IPA server
ipa_user
no admin
Administrative account used on IPA server
nonposix
no
Create as a non-POSIX group.
state
no present
  • present
  • absent
State to ensure
user
no
List of user names assigned to this group.
If an empty list is passed all users will be removed from this group.
If option is omitted assigned users will not be checked or changed.
Users that are already assigned but not passed will be removed.
validate_certs
no True
This only applies if ipa_prot is https.
If set to no, the SSL certificates will not be validated.
This should only set to no used on personally controlled sites using self-signed certificates.

Examples

# Ensure group is present
- ipa_group:
    name: oinstall
    gidnumber: 54321
    state: present
    ipa_host: ipa.example.com
    ipa_user: admin
    ipa_pass: topsecret

# Ensure that groups sysops and appops are assigned to ops but no other group
- ipa_group:
    name: ops
    group:
    - sysops
    - appops
    ipa_host: ipa.example.com
    ipa_user: admin
    ipa_pass: topsecret

# Ensure that users linus and larry are assign to the group, but no other user
- ipa_group:
    name: sysops
    user:
    - linus
    - larry
    ipa_host: ipa.example.com
    ipa_user: admin
    ipa_pass: topsecret

# Ensure group is absent
- ipa_group:
    name: sysops
    state: absent
    ipa_host: ipa.example.com
    ipa_user: admin
    ipa_pass: topsecret

Return Values

Common return values are documented here Return Values, the following are the fields unique to this module:

name description returned type sample
group Group as returned by IPA API always dict

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Support

This module is community maintained without core committer oversight.

For more information on what this means please read Module Support

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/ipa_group_module.html