Skip to content
Snippets Groups Projects
Select Git revision
  • 0fa28ba1fa37eb885b81f6c49e24a4a1baaae2bc
  • master default protected
  • v1.14.7
  • v1.14.6
  • v1.14.5
  • v1.14.4
  • v1.14.3
  • v1.14.2
  • v1.14.1
  • v1.14.0
  • v1.13.2
  • v1.13.1
  • v1.13.0
  • v1.12.1
  • v1.12.0
  • v1.11.1
  • v1.11.0
  • v1.10.0
  • v1.9.2
  • v1.9.1
  • v1.9.0
  • v1.8.4
22 results

README-user.md

Blame
  • README-user.md 12.28 KiB

    User module

    Description

    The user module allows to ensure presence, absence, disablement, unlocking and undeletion of users.

    The user module is as compatible as possible to the Ansible upstream ipa_user module, but additionally offers to preserve delete, enable, disable, unlock and undelete users.

    Features

    • User management

    Supported FreeIPA Versions

    FreeIPA versions 4.4.0 and up are supported by the ipauser module.

    Requirements

    Controller

    • Ansible version: 2.8+

    Node

    • Supported FreeIPA version (see above)

    Usage

    Example inventory file

    [ipaserver]
    ipaserver.test.local

    Example playbook to ensure a user is present:

    ---
    - name: Playbook to handle users
      hosts: ipaserver
      become: true
    
      tasks:
      # Ensure user pinky is present
      - ipauser:
          ipaadmin_password: SomeADMINpassword
          name: pinky
          first: pinky
          last: Acme
          uid: 10001
          gid: 100
          phone: "+555123457"
          email: pinky@acme.com
          passwordexpiration: "2023-01-19 23:59:59"
          password: "no-brain"
          update_password: on_create
    
      # Ensure user brain is present
      - ipauser:
          ipaadmin_password: SomeADMINpassword
          name: brain
          first: brain
          last: Acme

    update_password controls if a password for a user will be set in present state only on creation or every time (always).

    These two ipauser module calls can be combined into one with the users variable: