Refs #8025 Rol debian-base. root task - Move task from debian-once. Removed debian-once role. Added witness control to task ssh flow.

This commit is contained in:
Xavi Lleó 2024-10-17 13:18:45 +02:00
parent 4be47afe7d
commit 83110e0dca
5 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,4 @@
root_password: Pa$$w0rd
vn_witness: false vn_witness: false
default_user: user default_user: user
root_password: Pa$$w0rd root_password: Pa$$w0rd

View File

@ -1,5 +1,7 @@
- import_tasks: witness.yml - import_tasks: witness.yml
tags: witness tags: witness
- import_tasks: root.yml
tags: root
- import_tasks: resolv.yml - import_tasks: resolv.yml
tags: resolv tags: resolv
- import_tasks: timesync.yml - import_tasks: timesync.yml

View File

@ -13,6 +13,7 @@
}} }}
environment: environment:
PASSBOLT_CREATE_NEW_RESOURCE: true PASSBOLT_CREATE_NEW_RESOURCE: true
when: vn_witness
- name: Save the root password to file - name: Save the root password to file
copy: copy:
content: "{{ root_password }}\n" content: "{{ root_password }}\n"
@ -20,7 +21,10 @@
owner: root owner: root
group: root group: root
mode: '0600' mode: '0600'
when: vn_witness
register: local
- name: Change root password - name: Change root password
user: user:
name: root name: root
password: "{{ root_password | password_hash('sha512') }}" password: "{{ root_password | password_hash('sha512') }}"
when: local.changed

View File

@ -1 +0,0 @@
root_password: Pa$$w0rd

View File

@ -1,2 +0,0 @@
- import_tasks: root.yml
tags: root