Getting started

Example inventory

debops.users is included by default in the common.yml DebOps playbook; you don't need to do anything to have it executed.

If you don’t want to let debops.users manage user accounts, you can disable it with the following setting in your inventory:

users__enabled: False

Example playbook

If you are using this role without DebOps, here's an example Ansible playbook that uses the debops.users role:

---

- name: Manage local users and groups
  hosts: [ 'debops_all_hosts', 'debops_service_users' ]
  become: True

  environment: '{{ inventory__environment | d({})
                   | combine(inventory__group_environment | d({}))
                   | combine(inventory__host_environment  | d({})) }}'

  roles:

    - role: debops.users
      tags: [ 'role::users' ]

Ansible tags

You can use Ansible --tags or --skip-tags parameters to limit what tasks are performed during Ansible run. This can be used after host is first configured to speed up playbook execution, when you are sure that most of the configuration has not been changed.

Available role tags:

role::users
Main role tag, should be used in the playbook to execute all of the role tasks as well as role dependencies.