2025-04-10 16:09:27 +02:00
2025-04-10 16:09:27 +02:00
2025-04-10 16:09:27 +02:00
2025-04-10 16:09:27 +02:00
2025-04-10 16:09:27 +02:00
2022-10-10 09:18:54 +00:00
2022-10-10 09:18:54 +00:00
2025-04-10 16:09:27 +02:00

role_users

Deploy users, groups, sudoers and ssh authorized_keys.

inventory.yml

---

all:
  hosts:
    host1.ykn.local:

host_vars/host1.ykn.local.yml

---

users: []
  - name: ansible
    comment: "Ansible user"
    update_password: on_create
    password_lock: true
    append: true
    shell: /bin/bash
    groups: ["sudo"]
    extras:
      authorized_keys:
        - ssh-ed25519 <key> ansible
        - ssh-ed25519 <key> bot_ansible
      sudoers: ansible ALL=(ALL) NOPASSWD:ALL
  - name: flast
    comment: First LAST
    password: <https://docs.ansible.com/ansible/latest/collections/ansible/builtin/user_module.html#parameter-password>
    password_lock: false
    shell: /bin/bash
    groups: ["sudo", "adm"]
    extras:
      authorized_keys:
        - ssh-ed25519 <key> flast@computer1
        - ssh-ed25519 <key> flast@computer2
Description
Deploy users, groups, sudoers and ssh authorized_keys.
Readme GPL-3.0 158 KiB
Languages
Jinja 100%