group – Manage presence, attributes and member of AIX groups.¶
Synopsis¶
It allows to create new group, to change/remove attributes and administrators or members of a group, and to delete an existing group.
Requirements¶
The below requirements are needed on the host that executes this module.
AIX >= 7.1 TL3
Python >= 2.7
Privileged user with authorizations: aix.security.group.remove.admin,aix.security.group.remove.normal, aix.security.group.create.admin,aix.security.group.create.normal,aix.security.group.list
Parameters¶
- name (True, str, None)
Specifies the name of the group to manage.
- state (True, str, None)
Specifies the action to be performed.
presentcreates a new group. When the group already exists, use sate=modify to change its attributes.
absentdeletes an existing group. Users who are group members are not removed.
modifychanges specified value of attributes of an existing group. When the group does not exist, use sate=present.- group_attributes (optional, dict, None)
Specifies the attributes for the group to be created or modified.
Can be used when state=present or state=modify.
- user_list_action (optional, str, None)
Specifies to add or remove members/admins from the group.
addto add members or admins of the group with provided users_list in group name
removeto remove members or admins of the group with provided users_list from group nameCan be used when state=present or state=modify.
- user_list_type (optional, str, None)
Specifies the type of user to add/remove.
membersspecifies the user_list_action is performed on members of the group
adminsspecifies the user_list_action is performed on admins of the groupCan be used when state=present or state=modify.
- users_list (optional, list, None)
Specifies a list of user to be added/removed as members/admins of the group.
Should be used along with user_list_action and user_list_type parameters.
Can be used when state=present or state=modify.
- remove_keystore (optional, bool, True)
Specifies to remove the group’s keystore information while removing the goup.
Can be used when state=absent.
Notes¶
Note
You can refer to the IBM documentation for additional information on the commands used at https://www.ibm.com/support/knowledgecenter/ssw_aix_72/m_commands/mkgroup.html, https://www.ibm.com/support/knowledgecenter/ssw_aix_72/c_commands/chgrpmem.html, https://www.ibm.com/support/knowledgecenter/ssw_aix_72/r_commands/rmgroup.html.
Examples¶
- name: Change group ansible
ibm.power_aix.group:
state: present
name: ansible
user_list_action: 'add'
user_list_type: 'member'
users_list: 'test1'
Return Values¶
- msg (always, str, Group: foo SUCCESSFULLY created.)
The execution message.
- cmd (always, str, )
The command executed.
- rc (When the command is executed., int, )
The command return code.
- stdout’ (If the command failed., str, )
The standard output.
- stderr’ (If the command failed., str, )
The standard error.