julien_lecomte.proxmox.proxmox_user (0.1.1) — module

Adds, modifies, or removes a Proxmox user.

Authors: Julien Lecomte (julien@lecomte.at)

Install collection

Install with ansible-galaxy collection install julien_lecomte.proxmox:==0.1.1


Add to requirements.yml

  collections:
    - name: julien_lecomte.proxmox
      version: 0.1.1

Description

Adds, modifies, or removes a Proxmox user.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create user foobar@pam
  julien_lecomte.proxmox.proxmox_user:
    name: foobar
    realm: pam
    state: present

Inputs

    
keys:
    description:
    - Unsupported (TODO)
    type: str

name:
    description:
    - The username
    required: true
    type: str

email:
    description:
    - Optionally sets the email field.
    type: str

realm:
    description:
    - 'The realm. (eg: pam, pve)'
    required: true
    type: str

state:
    choices:
    - absent
    - present
    default: present
    description:
    - Whether the given key (with the given key_options) should or should not be in the
      file.
    type: str

expire:
    description:
    - Account expiration date (seconds since epoch). 0 means no expiration date (default
      on creation).
    type: int

groups:
    description:
    - Add user to specified groups.
    type: list

comment:
    description:
    - Optionally sets the comment field.
    type: str

enabled:
    description:
    - Enable the account (default on creation). You can set this to False to disable the
      account.
    type: bool

lastname:
    description:
    - Optionally sets the lastname field.
    type: str

password:
    description:
    - Unsupported (TODO)
    type: str

firstname:
    description:
    - Optionally sets the firstname field.
    type: str

Outputs

comment:
  description: Comment field.
  returned: When user exists and field is set.
  type: str
email:
  description: Email field.
  returned: When user exists and field is set.
  type: str
enabled:
  description: Enable field.
  returned: When user exists.
  type: int
expire:
  description: Account expiration date (seconds since epoch).
  returned: When user exists.
  type: int
firstname:
  description: Firstname field.
  returned: When user exists and field is set.
  type: str
groups:
  description: List of groups
  returned: When user exists and groups was specified in the task options.
  type: list
lastname:
  description: Lastname field.
  returned: When user exists and field is set.
  type: str
realm:
  description: Proxmox realm
  returned: When user exists.
  type: str
state:
  description: State ("absent" or "present")
  returned: On success
  type: str
userid:
  description: Proxmox userid
  returned: On success
  type: str