refs #8025 root witness fixes, requirements fixes
This commit is contained in:
parent
23afdcda66
commit
e9f52640ba
|
@ -2,7 +2,7 @@
|
|||
remote_user = root
|
||||
host_key_checking = False
|
||||
roles_path = ./roles
|
||||
inventory = ./inventories/lab
|
||||
inventory = ./inventories/local
|
||||
gathering = smart
|
||||
interpreter_python = auto_silent
|
||||
deprecation_warnings = False
|
||||
|
|
|
@ -12,5 +12,5 @@ collections:
|
|||
version: '>=2.14.0'
|
||||
type: galaxy
|
||||
- name: community.general
|
||||
vesion: '>=6.6.2'
|
||||
version: '>=9.5.0'
|
||||
type: galaxy
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
py-passbolt==0.0.18
|
||||
cryptography==3.3.2
|
||||
PGPy==0.6.0
|
||||
passlib==1.7.4
|
||||
|
|
|
@ -8,3 +8,9 @@ collections:
|
|||
- name: anatomicjc.passbolt
|
||||
version: '>=0.0.14'
|
||||
type: galaxy
|
||||
- name: community.crypto
|
||||
version: '>=2.14.0'
|
||||
type: galaxy
|
||||
- name: community.general
|
||||
version: '>=9.5.0'
|
||||
type: galaxy
|
||||
|
|
|
@ -1,18 +1,15 @@
|
|||
- name: Generate root password
|
||||
- name: Search root password in Passbolt
|
||||
when: vn_first_time
|
||||
block:
|
||||
- name: Search root password into Passbolt
|
||||
set_fact:
|
||||
qst: >
|
||||
{{
|
||||
lookup(passbolt, inventory_hostname_short,
|
||||
username='root',
|
||||
uri='ssh://'+hostname_fqdn
|
||||
)
|
||||
}}
|
||||
ignore_errors: true
|
||||
- name: Generate and save root password if not found in Passbolt
|
||||
when: qst is not defined
|
||||
ignore_errors: true
|
||||
set_fact:
|
||||
pb_password: >
|
||||
{{
|
||||
lookup(passbolt, inventory_hostname_short,
|
||||
username='root',
|
||||
uri='ssh://'+hostname_fqdn
|
||||
)
|
||||
}}
|
||||
- when: vn_first_time and pb_password is not defined
|
||||
block:
|
||||
- name: Generate a random root password
|
||||
set_fact:
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
- name: Check if witness have been generated
|
||||
- name: Check if witness file exists
|
||||
stat:
|
||||
path: /etc/vn.witness
|
||||
register: keys_generated_marker
|
||||
- name: Generate variable if not exists
|
||||
register: witness_file
|
||||
- name: Set the witness variable
|
||||
set_fact:
|
||||
vn_first_time: "{{ not keys_generated_marker.stat.exists }}"
|
||||
- name: Create marker file to indicate vn happends
|
||||
vn_first_time: "{{ not witness_file.stat.exists }}"
|
||||
- name: Create the witness file if it does not exist
|
||||
file:
|
||||
path: /etc/vn.witness
|
||||
state: touch
|
||||
|
|
Loading…
Reference in New Issue