Admin User
Use the nios_adminuser
module to create, update, or remove an admin user object from a NIOS Grid.
The following table describes the parameters you can define in the nios_adminuser
module:
Parameter | Required/Optional | Description |
---|---|---|
| Required | Specifies the name of the admin user that you want to add, update, or remove from NIOS. |
| Required | Specifies the names of admin groups to which this user belongs. |
| Optional | Specifies the password to use when signing in as this user. Note: If a playbook has the |
| Optional | Specifies the authentication type for the admin user.
The default type is |
| Optional | Specifies the authentication method that must be used to authenticate this user.
The default value is To define this parameter, you must set |
| Optional | Determines whether the user is allowed to sign in only with the CA certificate. Note: To use certificate authentication, you must set the |
| Optional | Specifies the CA certificate that is used for user lookup when authenticating this user. |
| Optional | Specifies the serial number of the client certificate. |
| Optional | Determines whether the admin user is disabled or not. When this is set to |
| Optional | Specifies the email address of the admin user. |
| Optional | Determines whether a time zone must be used for this user. |
| Optional | Specifies the time zone for this admin user. For valid values, refer to the adminuser object in the WAPI documentation. |
| Optional | Determines whether SSH keys must be used to authenticate this user. Note: To use SSH keys for authentication, you must set the |
| Optional | Specifies the list of SSH keys for the admin user.
This is a required field when you set |
| Optional | Specifies extensible attributes for the admin user object. |
| Optional | Specifies the state of the admin user instance on the NIOS server.
|
| Optional | Describes the admin user object. |
| Required | Defines the details of the connection:
For information on additional fields you can define, see the list of subparameters in the NIOS Modules for Ansible Collections topic. |
| Required | The |
Examples
name: Create a new admin user
infoblox.nios_modules.nios_adminuser:
name: ansible_user
admin_groups: admin-group
password: "secure_password"
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
name: Update admin user name
infoblox.nios_modules.nios_adminuser:
name: {new_name: new_user, old_name: ansible_user}
admin_groups: admin-group
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
name: Create admin user with remote authentication
infoblox.nios_modules.nios_adminuser:
name: remote_admin_user
admin_groups: admin-group
auth_type: "REMOTE"
email: "admin@example.com"
use_time_zone: true
time_zone: 'US/Hawaii'
extattrs:
Site: "USA"
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
name: Create admin user with ssh keys
infoblox.nios_modules.nios_adminuser:
name: cloud_user
admin_groups: cloud-api-only
comment: "Created by Ansible"
disable : false
password: "secure_password"
use_ssh_keys: true
ssh_keys:
- key_name: "sshkey1"
key_type: "RSA"
key_value: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
- key_name: "sshkey2"
key_type: "ECDSA"
key_value: "{{ lookup('file', '~/.ssh/id_ecdsa.pub') }}"
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
name: Update admin user to enable certificate authentication
infoblox.nios_modules.nios_adminuser:
name: admin_user
admin_groups: admin-group
enable_certificate_authentication: true
ca_certificate_issuer: 'CN="ib-root-ca"'
client_certificate_serial_number: "397F9435000100000031"
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
name: Remove admin user
infoblox.nios_modules.nios_adminuser:
name: new_user
admin_groups: admin-group
state: absent
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local