Centralize users list in group_vars and rename baseline playbook
Move the canonical user list to group_vars/all/users.yml so both setup_linux.yml (renamed from initial_setup.yml) and the initial_install users role consume the same source of truth. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,28 +1,5 @@
|
||||
---
|
||||
- name: Define users
|
||||
ansible.builtin.set_fact:
|
||||
users:
|
||||
- name: automation
|
||||
shell: /bin/bash
|
||||
sudo_nopasswd: true
|
||||
ssh_keys:
|
||||
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEx+ltCKNIEM7F4PzGLv22cIu7N0Fpn5gxwV02xq0GS9 automation@internet-master.cz"
|
||||
|
||||
- name: hellsos
|
||||
shell: /bin/bash
|
||||
sudo_nopasswd: true
|
||||
ssh_keys:
|
||||
- "ssh-ed25519 AAAAC3..."
|
||||
|
||||
- name: jim
|
||||
shell: /bin/bash
|
||||
sudo_nopasswd: true
|
||||
ssh_keys:
|
||||
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPFS4fsqMjMMu/Bi/884bw7yJBqvWusDRESvanH6Owco jakub@jimbuntu"
|
||||
|
||||
# --------------------------------------------------
|
||||
# Create users
|
||||
# --------------------------------------------------
|
||||
# `users` comes from group_vars/all/users.yml
|
||||
- name: Ensure users exist
|
||||
ansible.builtin.user:
|
||||
name: "{{ item.name }}"
|
||||
|
||||
Reference in New Issue
Block a user