Anpassung Bootstrap (#9)
Aufgabe: become: true Aufgabe wieder verschoben Bugfix: bootstrap Syntax Syntax Syntax become zu Rolle gepackt Passwort mg ändern in Rolle Co-authored-by: Michael Grote <38253905+quotengrote@users.noreply.github.com> Reviewed-on: mg/ansible#9
This commit is contained in:
parent
98b812fe01
commit
0f22b2af23
1 changed files with 11 additions and 21 deletions
|
@ -1,29 +1,11 @@
|
||||||
---
|
---
|
||||||
- hosts: all
|
- hosts: all
|
||||||
become: yes
|
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
max_fail_percentage: 20%
|
max_fail_percentage: 20%
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- { role: robertdebock.bootstrap,
|
- { role: robertdebock.bootstrap, tags: "bootstrap", become: yes}
|
||||||
tags: "bootstrap"
|
- { role: ryandaniels.create_users, tags: "user", become: yes}
|
||||||
}
|
- { role: nickjj.ansible-user, tag: "ansible", become: yes }
|
||||||
- { role: ryandaniels.create_users,
|
|
||||||
tags: "user",
|
|
||||||
become: yes
|
|
||||||
}
|
|
||||||
- { role: nickjj.ansible-user,
|
|
||||||
tag: "ansible",
|
|
||||||
become: yes,
|
|
||||||
ansible_password: "{{ lookup('keepass', 'linux_mg_user_password_cleartext', 'password') }}",
|
|
||||||
ansible_become_password: "{{ lookup('keepass', 'linux_mg_user_password_cleartext', 'password') }}"
|
|
||||||
}
|
|
||||||
tasks:
|
|
||||||
- name: Change user password
|
|
||||||
user:
|
|
||||||
name: mg
|
|
||||||
update_password: always
|
|
||||||
password: "{{ lookup('keepass', 'linux_mg_user_password_hash', 'password') }}"
|
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
### nickjj.ansible-users
|
### nickjj.ansible-users
|
||||||
|
@ -40,4 +22,12 @@
|
||||||
ansible_become_password: "hallowelt"
|
ansible_become_password: "hallowelt"
|
||||||
ansible_ssh_common_args: "'-o StrictHostKeyChecking=no'"
|
ansible_ssh_common_args: "'-o StrictHostKeyChecking=no'"
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Change user password
|
||||||
|
become: true
|
||||||
|
user:
|
||||||
|
name: mg
|
||||||
|
update_password: always
|
||||||
|
password: "{{ lookup('keepass', 'linux_mg_user_password_hash', 'password') }}"
|
||||||
|
|
||||||
# Nach dem ersten durchlaufen ist keine Anmeldung mehr per Passwort & ssh möglich. Somit scheitert auch der Versuch das Playbook ein zweites mal durchlaufen zu lassen.
|
# Nach dem ersten durchlaufen ist keine Anmeldung mehr per Passwort & ssh möglich. Somit scheitert auch der Versuch das Playbook ein zweites mal durchlaufen zu lassen.
|
||||||
|
|
Loading…
Reference in a new issue