ansible/justfile

22 lines
556 B
Plaintext
Raw Permalink Normal View History

2023-03-28 17:49:36 +02:00
#!/usr/bin/env -S just --justfile
2023-05-09 09:58:28 +02:00
password_file := "get_password.sh"
# may need to use --force to reinstall all requirements
reqs *ARGS:
ansible-galaxy install -r requirements.yaml {{ARGS}}
2023-03-28 17:49:36 +02:00
deploy HOST *ARGS:
ansible-playbook \
--inventory hosts.yml \
2023-05-09 09:58:28 +02:00
--vault-password-file {{password_file}} \
2023-03-28 17:49:36 +02:00
--limit {{HOST}} \
{{ARGS}} \
deploy.yml
2023-05-09 09:58:28 +02:00
# just vault (encrypt/decrypt/edit)
vault ACTION:
EDITOR="nvim" ansible-vault {{ACTION}} \
--vault-password-file {{password_file}} \
vars/vault.yaml