All Projects → jasonheecs → ansible-digitalocean

jasonheecs / ansible-digitalocean

Licence: MIT license
An ansible role that creates a DigitalOcean droplet and returns the droplet's IP address for further use in playbooks

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to ansible-digitalocean

Tugboat
A command line tool for interacting with your DigitalOcean droplets.
Stars: ✭ 1,465 (+7225%)
Mutual labels:  digitalocean, droplet
ansible-role-do-agent
Cross-distro installation of the DigitalOcean monitoring agent
Stars: ✭ 22 (+10%)
Mutual labels:  digitalocean, ansible-role
dots
digital ocean api typescript/javascript wrapper
Stars: ✭ 65 (+225%)
Mutual labels:  digitalocean, droplet
ansible-role-create-users
Manage users on Linux using Ansible
Stars: ✭ 73 (+265%)
Mutual labels:  ansible-role
hacktoberfest 2021
Solve the given questions, and submit a PR.💬 Make sure you submit the solution in the correct folder. ✔
Stars: ✭ 44 (+120%)
Mutual labels:  digitalocean
ansible-role-zerotier
Ansible role to install Zerotier-One and join a Zerotier network
Stars: ✭ 64 (+220%)
Mutual labels:  ansible-role
pvwa
Ansible role to deploy Cyberark Password Vault Web Access
Stars: ✭ 16 (-20%)
Mutual labels:  ansible-role
RHEL7-CIS
Ansible RHEL 7 - CIS Benchmark Hardening Script
Stars: ✭ 28 (+40%)
Mutual labels:  ansible-role
ansible-role-win updates
Install Windows updates using Ansible.
Stars: ✭ 24 (+20%)
Mutual labels:  ansible-role
digitalocean exporter
Prometheus exporter for DigitalOcean metrics, written in Go.
Stars: ✭ 100 (+400%)
Mutual labels:  digitalocean
CODE-CAMP-2020
A Virtual Hackathon Camp for Developers, Build real products and win Swags in comfort of your home.
Stars: ✭ 30 (+50%)
Mutual labels:  digitalocean
ansible-role-bastille
An ansible role that helps configure a server as a BastilleBSD host
Stars: ✭ 15 (-25%)
Mutual labels:  ansible-role
phoenix example
An example Phoenix app with one-click deployments to different cloud services.
Stars: ✭ 62 (+210%)
Mutual labels:  digitalocean
hacktoberfest
Fork and Create a Pull Request
Stars: ✭ 13 (-35%)
Mutual labels:  digitalocean
doclt
Digital Ocean Command Line Tool
Stars: ✭ 43 (+115%)
Mutual labels:  digitalocean
server
👨🏾‍🍳 Server for Ferdi that you can re-use to run your own
Stars: ✭ 26 (+30%)
Mutual labels:  digitalocean
cluster-api-provider-digitalocean
The DigitalOcean provider implementation of the Cluster Management API
Stars: ✭ 85 (+325%)
Mutual labels:  digitalocean
competetive-code-hacktoberfest
For Hacktoberfest Contribution
Stars: ✭ 14 (-30%)
Mutual labels:  digitalocean
doks-example
Example DigitalOcean Kubernetes workload with service exposed through a DO load-balancer.
Stars: ✭ 150 (+650%)
Mutual labels:  digitalocean
djeasy
Django Project Deploy Easier to in Debian Distribution!
Stars: ✭ 24 (+20%)
Mutual labels:  digitalocean

Ansible Role: DigitalOcean Droplet Creation

Build Status Galaxy Role

An ansible role that creates a DigitalOcean droplet and add the droplet's IP address to the inventory file.

Requirements

None.

Installation

ansible-galaxy install jasonheecs.digitalocean

Role Variables

Role variables are listed in defaults/main.yml, and sensitive variables (like your DigitalOcean API token) should be listed in vars/private.yml.

Available variables are listed below, along with default values (see defaults/main.yml and vars/private.yml.example):

# SSH Key identifier in your DigitalOcean account
do_ssh_key_name: Ansible SSH Key
# Public SSH key to be added to your account
do_ssh_pub_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
# Private key used to ssh into your droplet
do_ssh_private_key: "~/.ssh/id_rsa"

# Name of the droplet
droplet_name: test-droplet
# This is the slug of the region you would like your server to be created in.
droplet_region_id: sgp1
# This is the slug of the size you would like the droplet to be created with.
droplet_size_id: 512mb
# This is the slug of the image you would like the droplet to be created with.
droplet_image_id: ubuntu-18-04-x64

# Location of your ansible inventory file
ansible_inventory_file: hosts.ini
# The group name that is used for grouping your droplets in your inventory file
droplets_inventory_group: do_droplets

# Your DigitalOcean Personal Access Token (https://www.digitalocean.com/community/tutorials/how-to-use-the-digitalocean-api-v2)
do_api_token: inserttokenhere
# Additional SSH Keys to add to the droplet during the creation process (https://developers.digitalocean.com/documentation/v2/#ssh-keys)
droplet_additional_ssh_key_ids: []

Dependencies

None.

Example Playbooks

A playbook that runs this role on a remote machine:

- hosts: all
  become: no
  roles:
    - { role: jasonheecs.digitalocean }

A playbook that runs this role on your local machine:

- hosts: localhost
  connection: local
  become: no
  roles:
    - { role: jasonheecs.digitalocean }

Refer to a sample playbook here.

Tests

Automated testing is done via Test Kitchen, Kitchen Ansible and Kitchen Docker

To run the tests, make sure Ruby and Docker are installed and run the following:

gem install bundler && bundle exec kitchen test

Refer to the travis.yml file and Travis build logs for details on the test build process and expected outputs.

Supported Platforms

This ansible role has been tested against the following platforms:

  • macOS Sierra
  • macOS High Sierra
  • Ubuntu 16.04
  • Ubuntu 14.04
  • CentOS 7
  • Debian 9

License

MIT

Author Information

Jason Hee

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].