generated from nicolabelluti/template-ansible
Added users role to manage the playbook as root and remove admin privileges from deck
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user