oneidentity.authentication_services.get_local_unix_users (0.3.1) — module

Returns all users or specific user accounts.

| "added in version" 2.9 of oneidentity.authentication_services"

Authors: Laszlo Nagy (laszlo.nagy@oneidentity.com)

preview | supported by community

Install collection

Install with ansible-galaxy collection install oneidentity.authentication_services:==0.3.1


Add to requirements.yml

  collections:
    - name: oneidentity.authentication_services
      version: 0.3.1

Description

Returns either all users or some specific users from /etc/passwd.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Normal usage
  get_local_unix_users:
    user_name: ''
    uid_number: ''
    gid_number: ''
    comment: ''
    home_directory: ''
    login_shell: ''
  register: get_local_unix_users_result

Inputs

    
facts:
    default: true
    description:
    - Generate Ansible facts?
    required: false
    type: bool

comment:
    default: ''
    description:
    - User ID Info (GECOS).
    required: false
    type: str

facts_key:
    default: local_unix_users
    description:
    - Ansible facts key
    required: false
    type: str

user_name:
    default: ''
    description:
    - User name.
    required: false
    type: str

gid_number:
    default: ''
    description:
    - Group ID.
    required: false
    type: str

uid_number:
    default: ''
    description:
    - User ID.
    required: false
    type: str

login_shell:
    default: ''
    description:
    - Command/shell.
    required: false
    type: str

home_directory:
    default: ''
    description:
    - Home directory.
    required: false
    type: str

Outputs

ansible_facts:
  description: All non-standard return values are placed in Ansible facts
  keys:
    changed:
      description: Did the state of the host change?
      returned: always
      type: bool
    failed:
      description: Did the module fail?
      returned: always
      type: bool
    local_unix_users:
      description: All fields of each user account
      returned: always
      type: list of lists
    msg:
      description: Additional information if failed
      returned: always
      type: str
    params:
      description: Parameters passed in
      returned: always
      type: dict
  returned: when facts parameter is true
  type: dict