Instalacja
pipx install --include-deps ansible
Playbook
ansible-galaxy init --offline bogus.voidlinux
Vault
ansible-vault create secret
Ustaw hasło do pliku. W pliku wpisz hasło dla roota:
ansible_sudo_pass: <sudo-password>
Zapisz - w playbooku dodaj:
- hosts: all
vars_files:
- secret
Create a file called vault.txt and in that put the password that you used when creating your secret file. The password should be a string stored as a single line in the file.
ansible-playbook playbook.yml --vault-password-file vault.txt
pwgen -s 64 -1 | xsel -bi
ansible-vault create secret
ansible_sudo_pass: <sudo-password>
xsel -bo >vault.txt
playbook.yml:
vars_files:
- secret