chore(ansible): template file locally

This commit is contained in:
Michele Cereda
2024-11-01 20:59:20 +01:00
parent 95c0915b3c
commit 70f15009b6

View File

@@ -52,7 +52,10 @@ ansible-playbook 'path/to/playbook.yml' --syntax-check
ansible -i 'hosts.yml' -m 'ping' 'all'
ansible -i 'host-1,host-n,' 'hostRegex' -m 'ansible.builtin.shell' -a 'echo $TERM'
ansible -i 'localhost ansible_python_interpreter=venv/bin/python3,' -c 'local' 'localhost' \
-m 'ansible.builtin.copy' -a 'src=/tmp/src' -a 'dest=/tmp/dest'
-m 'ansible.builtin.copy' -a 'src=/tmp/src dest=/tmp/dest'
ansible -i 'localhost,' -c 'local' -Cvvv 'localhost' \
-m 'ansible.builtin.template' -a 'src=anonymizer/templates/anonymize_data.sql.j2 dest=/tmp/anonymize_data.sql' \
-e 'country=ireland' -e '{"phone_codes":{"ireland":"+353"}}'
ansible-vault encrypt_string --name 'command_output' 'somethingNobodyShouldKnow'
ANSIBLE_VAULT_PASSWORD='ohSuchASecurePassword' ansible-vault encrypt --output 'ssh.key' '.ssh/id_rsa'