This is my repository of the roles I use to manage most of my infrastructure and other things. The idea is I would use event driven ansible to perform automatic configuration upon provisioning of whatever I set up just by making a web call with curl or something to it.
- mkdir hosts.
- Add your inventory files to hosts/.
- Create your own vars/private_config.yml from vars/private_config_example.yml.
- Modify the private_key_file variable in ansible.cfg to point to the correct path for your SSH private key.
- Run: ansible-rulebook -r rulebook.yml -i hosts/ -vv
- If you are using a directory for your inventory, you have to put a "/" at the end to indicate it is a directory.
- On a test host, run: curl http://ansible-eda:6000 -d '{"host": "test-host-1", "cloud-init-setup": true}'
pipx install ansible-core
pipx inject --include-apps ansible-core dnspython
pipx inject --include-apps ansible-core jmespath
pipx inject --include-apps ansible-core netaddr
pipx inject --include-apps --include-deps ansible-core requests
pipx inject --include-apps ansible-core pyVim
pipx inject --include-apps ansible-core PyVmomi
pipx inject --include-apps --include-deps --force ansible-core selinux
ansible-galaxy collection install --upgrade ansible.posix ansible.utils cloud.common community.general containers.podman community.vmware vmware.vmware_rest kubernetes.core
pipx upgrade-all --include-injected
pipx inject --include-apps ansible-core ansible-dev-tools