How to programatically create and configure a digital ocean droplet using API and Ansible?
We have a working ansible script which we use to configure a droplet after it is manually provisioned.
We are now planning to ditch manual process and automate creation and destruction of do instances using a python script. This is the workflow I have in mind.
- Create a droplet, with all required software and save it as a snapshot
- When needed spin up a droplet based on the snapshot using python api from a script
- Using Ansible make config changes to the snapshot, from the same script
The idea is to have fully automatic creation of instances, from a python script, with all software installed and all configuration done.
My question is how to do the step 3?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.