feat(role): Change local account password
This commit is contained in:
@@ -1,6 +1 @@
|
||||
root_home_dir_abs: '/root'
|
||||
ansible_hashi_vault_auth_method: 'token'
|
||||
ansible_hashi_vault_token: 'hvs.xxxxxxxxxx'
|
||||
ansible_hashi_vault_engine_mount_point: 'kv'
|
||||
ansible_hashi_vault_token_validate: 'false'
|
||||
ansible_hashi_vault_url: 'http://localhost:8200/'
|
||||
|
@@ -3,12 +3,25 @@
|
||||
loop_control:
|
||||
loop_var: 'server'
|
||||
with_community.hashi_vault.vault_kv2_get:
|
||||
- '{{ inventory_hostname | split(".") | reverse | join("/") }}/os/root/creds'
|
||||
- '{{ inventory_hostname | split(".") | reverse | join("/") }}/os/{{ reset_password_for_account }}/creds'
|
||||
ansible.builtin.set_fact:
|
||||
vault_data: '{{ server.secret }}'
|
||||
|
||||
|
||||
|
||||
- name: 'If a secret is missing fail progress'
|
||||
tags:
|
||||
- 'first_run'
|
||||
- 'never'
|
||||
include_role:
|
||||
name: '10-include-40-check-if-vault-var'
|
||||
vars:
|
||||
- inc_vault_data: '{{ vault_data }}'
|
||||
- fail_check:
|
||||
- 'initial_password'
|
||||
|
||||
|
||||
|
||||
- name: 'If first run: set SSH password'
|
||||
tags:
|
||||
- 'first_run'
|
||||
|
Reference in New Issue
Block a user