homelab/.justfile

24 lines
642 B
Makefile

export ANSIBLE_VAULT_PASSWORD_FILE := ".decrypt-pass.txt"
# Debug output, disabled in CI
export ANSIBLE_DISPLAY_ARGS_TO_STDOUT := if env('CI', '') == 'true' { 'false' } else { 'true' }
export ANSIBLE_ENABLE_TASK_DEBUGGER := if env('CI', '') == 'true' { 'false' } else { 'true' }
play +ARGS:
ansible-playbook {{ ARGS }}
ansible +ARGS:
ansible {{ ARGS }}
list-host:
ansible-inventory --list
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 }}