====== Ansible ====== [[.:snippets|useful Ansible snippets]] ===== Store secrets and passwords to use with Ansible ===== * [[https://docs.ansible.com/ansible/latest/user_guide/vault.html|Ansible Vault]] * [[https://docs.ansible.com/ansible/latest/collections/community/general/passwordstore_lookup.html|Passwordstore Lookup]] * [[https://miterion.de/post/ansible-gopass/|Ansible Vaults with GoPass]] * [[https://www.hashicorp.com/products/vault|Hashicorp Vault]] ===== Docker ===== * [[https://docs.ansible.com/ansible/latest/docker_service_module.html|Ansible Docker Service Module]] ===== CMDB from Ansible ===== * [[https://github.com/fboender/ansible-cmdb|ansible-cmdb]] ===== Tools ===== * [[https://ara.recordsansible.org/|ARA Records Ansible]] – records Ansible execution results to sqlite, mysql or postgresql databases by using an Ansible callback plugin. Includes a CLI, web interface and an HTTP API. * [[https://github.com/Uberspace/paternoster|paternoster]] – runs Ansible commands as regular CLI scripts. * [[https://mitogen.networkgenomics.com/ansible_detailed.html|Mitogen for Ansible]] – redesigned UNIX connection layer and module runtime for Ansible, speeds up execution and reduces CPU usage. * [[https://open-vsx.org/extension/redhat/ansible|Ansible VSX IDE extension]] * [[https://ansible-runner.readthedocs.io/en/stable/|Ansible Runner]] ===== Tutorials ===== * [[https://www.youtube.com/watch?v=goclfp6a2IQ&list=PL2_OBreMn7FqZkvMYt6ATmgC0KAGGJNAN|Ansible 101 YouTube Playlist]] by [[https://www.jeffgeerling.com/|Jeff Geerling]] (follows his book "[[https://www.ansiblefordevops.com/|Ansible for DevOps]]") * [[https://blog.networktocode.com/blog/tags/ansible|Ansible in the NetworkToCode Blog]] ===== Important documentation ===== * [[https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable|Variable precedence]] – which variable gets evaluated first? * [[https://docs.ansible.com/ansible/latest/user_guide/playbooks_debugger.html|Debugging tasks]] * [[https://jinja.palletsprojects.com/en/3.0.x/templates/#whitespace-control|Jinja: Whitespace Control]] * [[https://docs.ansible.com/ansible/latest/collections/community/sops/docsite/guide.html|Protect secrets with SOPS]] * [[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/yaml_inventory.html|YAML Inventory]] * [[https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html|Special Variables]] * [[https://docs.ansible.com/ansible/2.9/user_guide/playbooks_delegation.html|Delegation]] – run tasks on other machines, do rolling upgrades etc. ===== Questions and Answers ===== * [[https://stackoverflow.com/questions/45908067/whats-the-difference-between-inventory-hostname-and-ansible-hostname|What's the difference between ansible_hostname and inventory_hostname?]] ===== Get help ===== * NetworkToCode Slack Channel * #social:ansible.com [[:guide:messenger:matrix|Matrix]] chat room