Playbook example for getting remote host credentials from
Assume the vault already up and running on
Two remote hosts with IP Address
The playbook will retrieve credentials from vault the create user in remote machines. We will user TLS mechanism to connect to vault.
Because this playbook using username and password to connect to machine, instead of
ssh-copy-id mechanism, we need to install
Additional variables to be exported for make this playbook run, due to self-signed certificate and sshpass:
export ANSIBLE_HOST_KEY_CHECKING=False export VAULT_SKIP_VERIFY=true