chore: add encryption tools
This commit is contained in:
parent
6e72e0ccff
commit
f77175307f
6 changed files with 72 additions and 15 deletions
27
.justfile
27
.justfile
|
|
@ -1,42 +1,43 @@
|
|||
set dotenv-load := true
|
||||
import '.devfiles/justfile'
|
||||
|
||||
export ANSIBLE_VAULT_PASSWORD_FILE := justfile_directory() + "/.decrypt-pass.txt"
|
||||
export ANSIBLE_BECOME_PASSWORD_FILE := justfile_directory() + "/.become-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:
|
||||
uv run ansible-playbook {{ ARGS }}
|
||||
uv run ansible-playbook {{ ARGS }}
|
||||
|
||||
deploy-services: (play "./playbooks/docker/services.yaml")
|
||||
|
||||
ansible +ARGS:
|
||||
uv run ansible {{ ARGS }}
|
||||
uv run ansible {{ ARGS }}
|
||||
|
||||
list-host:
|
||||
uv run ansible-inventory --list
|
||||
uv run ansible-inventory --list
|
||||
|
||||
[no-cd]
|
||||
encrypt +ARGS:
|
||||
uv run ansible-vault encrypt {{ ARGS }}
|
||||
encrypt-file +ARGS:
|
||||
uv run ansible-vault encrypt {{ ARGS }}
|
||||
|
||||
encrypt-var NAME +CONTENT='':
|
||||
uv run ansible-vault encrypt_string {{ if CONTENT != "" {"--name"} else {"--stdin-name"} }} {{ NAME }} {{ CONTENT }}
|
||||
uv run ansible-vault encrypt_string {{ if CONTENT != "" { "--name" } else { "--stdin-name" } }} {{ NAME }} {{ CONTENT }}
|
||||
|
||||
decrypt-var FILE NAME:
|
||||
uv run ansible localhost -m ansible.builtin.debug -e "@{{ FILE }}" -a var="{{ NAME }}"
|
||||
uv run ansible localhost -m ansible.builtin.debug -e "@{{ FILE }}" -a var="{{ NAME }}"
|
||||
|
||||
[no-cd]
|
||||
decrypt +ARGS:
|
||||
uv run ansible-vault edit {{ ARGS }}
|
||||
decrypt-file +ARGS:
|
||||
uv run ansible-vault edit {{ ARGS }}
|
||||
|
||||
[no-cd]
|
||||
decrypt-store +ARGS:
|
||||
uv run ansible-vault decrypt {{ ARGS }}
|
||||
uv run ansible-vault decrypt {{ ARGS }}
|
||||
|
||||
[no-cd]
|
||||
tofu +ARGS:
|
||||
tofu {{ ARGS }}
|
||||
tofu {{ ARGS }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue