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