refactor: split ansible book into roles
This commit is contained in:
parent
89a7bfa789
commit
22d7e4a318
14 changed files with 983 additions and 215 deletions
15
.justfile
15
.justfile
|
|
@ -1,18 +1,19 @@
|
|||
export ANSIBLE_VAULT_PASSWORD_FILE := "./.decrypt-pass.txt"
|
||||
|
||||
inventory := "./hosts/inventory.ini"
|
||||
export ANSIBLE_VAULT_PASSWORD_FILE := ".decrypt-pass.txt"
|
||||
|
||||
play +ARGS:
|
||||
ansible-playbook -i {{ inventory }} {{ ARGS }}
|
||||
ansible-playbook {{ ARGS }}
|
||||
|
||||
ansible +ARGS:
|
||||
ansible -i {{ inventory }} {{ ARGS }}
|
||||
ansible {{ ARGS }}
|
||||
|
||||
list-host:
|
||||
ansible-inventory -i {{ inventory }} --list
|
||||
ansible-inventory --list
|
||||
|
||||
encrypt +ARGS:
|
||||
ansible-valut encrypt {{ ARGS }}
|
||||
ansible-vault encrypt {{ ARGS }}
|
||||
|
||||
encrypt-var NAME +CONTENT='':
|
||||
ansible-vault encrypt_string {{ if CONTENT != "" {"--name"} else {"--stdin-name"} }} {{ NAME }} {{ CONTENT }}
|
||||
|
||||
decrypt +ARGS:
|
||||
ansible-vault edit {{ ARGS }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue