notebook/IT/Ansible/index.md
vincent 1783ac4390
All checks were successful
continuous-integration/drone/push Build is passing
add ansible template test
2023-11-01 09:30:37 +01:00

824 B

ansible

ansible

commande ansible

launch playbook on staging ansible-playbook -i staging site.yml --vault-password-file=.vaultpassword

init new role architecture ansible-galaxy user_config init launch ansible bootstrap ansible-playbook -i nas, bootstrap.yml -u root --ask-pass

encrypt string ansible-vault encrypt_string

ignore know host file on ansible

export ANSIBLE_HOST_KEY_CHECKING=False
--ssh-extra-args='-o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null'

Merge Dict instead Replace

in ansible config file set

hash_behaviour = merge

test ansible template in local

ansible -m ansible.builtin.template -a "src=daemon.json.j2 dest=./test.json" --extra-vars=@../defaults/main.yml localhost