Automating Docker Swarm configs with Ansible
The contents of this repository demonstrate the principles described in this blog article.
Running vagrant up
will provision a debian 11 VM running a Docker Swarm, by running the init.yaml
playbook.
Running the rotate_config.yaml
playbook will ensure that a service is running on the Docker Swarm, and generate a new config. The contents of the new config will be accessible on port 8080 (here). Details about the config are accessible through vagrant ssh
and docker config ls
.
ansible-playbook --private-key=.vagrant/machines/default/virtualbox/private_key -u vagrant -i .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory
- Ansible
- Vagrant