Skip to main content

Overview of User and Group Management Demos

Overview of User and Group Management Demos

User and Group Demos in Playbooks provide examples of how to manage users and groups on AIX systems using Ansible modules. These playbooks serve as practical examples for administrators to understand and implement user and group management on AIX systems using the Ansible ecosystem.

User Management

The playbooks/demo_user.yml playbook demonstrates various user management tasks such as creating users in LDAP, creating local users, modifying user attributes, and deleting users.


The playbooks/demo_user.yml playbook includes tasks for creating users in LDAP, creating local users, modifying user attributes, and deleting users. Below is an example of creating a user in LDAP.

---
- name: USER on AIX
hosts: "{{host_name}}"
gather_facts: false
vars:
host_name: all
user_name: aixguest
password_val: abc12345
attribute_home: /home/test/aixguest

tasks:
- name: Create user in LDAP
ibm.power_aix.user:
state: present
name: "{{ user_name }}"
change_passwd_on_login: false
password: "{{ password_val }}"
load_module: LDAP
attributes:
home: "{{ attribute_home }}"

Example: Creating a User in LDAP

The following snippet from playbooks/demo_user.yml demonstrates how to create a user in LDAP:

- name: Create user in LDAP
ibm.power_aix.user:
state: present
name: "{{ user_name }}"
change_passwd_on_login: false
password: "{{ password_val }}"
load_module: LDAP
attributes:
home: "{{ attribute_home }}"
data: 1272

Group Management

The playbooks/demo_group.yml playbook showcases group management tasks including creating groups locally and in LDAP, adding and removing group members, modifying group attributes, and deleting groups.


The playbooks/demo_group.yml playbook includes tasks for creating groups locally and in LDAP, adding and removing group members, modifying group attributes, and deleting groups. Below is an example of creating a group.

---
- name: GROUP on AIX
hosts: "{{host_name}}"
gather_facts: false
vars:
host_name: all
user_list_val: aixtestgroup
group_name: aix_g7
group_name1: aix_g8
load_module: LDAP
tasks:

- name: Create a group #create a group in local
ibm.power_aix.group:
state: present
load_module: files
name: "{{ group_name }}"
- name: Create a group #create a group in LDAP even its present in local
ibm.power_aix.group:
state: present
load_module: LDAP

Example: Creating a Group

The following snippet from playbooks/demo_group.yml demonstrates how to create a group:

- name: Create a group
ibm.power_aix.group:
state: present
load_module: files
name: "{{ group_name }}"
- name: Create a group in LDAP
ibm.power_aix.group:
state: present
load_module: LDAP

 

This is an auto-generated document by Swimm 🌊 and has not yet been verified by a human