Launching a Droplet

As per previous playbooks we have written, you can create the skeleton structure by running the following commands:

$ mkdir digitalocean digitalocean/group_vars digitalocean/roles$ ansible-galaxy init digitalocean/roles/droplet$ touch digitalocean/production digitalocean/site.yml digitalocean/group_vars/common.yml

There are two tasks we need to complete to launch our Droplet; the first is that we need to make sure that a copy of our public SSH key is uploaded to DigitalOcean so that we can inject it into our Droplet launched during the second task.

Before we proceed with looking at the role which launches the Droplet we should figure what we are going to do with the personal access token required by the playbook to access ...

Get Learn Ansible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.