Added users role to manage the playbook as root and remove admin privileges from deck

This commit is contained in:
2026-10-13 12:49:13 +02:00
parent 80a79fcc99
commit d00d99ce45
18 changed files with 153 additions and 42 deletions
+25
View File
@@ -1,3 +1,28 @@
- name: Manage users
hosts: bc250
tags:
- 'never'
- 'users'
vars:
ansible_user: deck
ansible_ssh_pass: deck
ansible_become_password: deck
pre_tasks:
- name: Inserisci il percorso della chiave pubblica
run_once: true # noqa: run-once[task]
ansible.builtin.pause:
prompt: |-
Inserisci il percorso della chiave pubblica [~/.ssh/id_ed25519.pub]
register: install_ssh_keys__ssh_pubkey_path
- name: Imposta il percorso della chiave pubblica
run_once: true # noqa: run-once[task]
ansible.builtin.set_fact:
install_ssh_keys__ssh_pubkey_path: "{{ install_ssh_keys__ssh_pubkey_path.user_input or '~/.ssh/id_ed25519.pub' }}"
roles:
- name: Manage the users
role: users
- name: Configure the BC250
hosts: bc250
roles: