Skip to content

Instantly share code, notes, and snippets.

@sprin
Last active August 29, 2015 14:04
Show Gist options
  • Save sprin/fc0ddcdfa330aa93facc to your computer and use it in GitHub Desktop.
Save sprin/fc0ddcdfa330aa93facc to your computer and use it in GitHub Desktop.
ansible module argument syntax?
---
# Do this?
- name: create droplet 512MB/Centos 7/Region NYC2
digital_ocean: >
command=droplet
state=present
name={{ droplet_name }}
client_id={{ client_id }}
api_key={{ api_key }}
size_id=66
ssh_key_ids={{ do_droplet.ssh_key.id }}
region_id=4
image_id=4856048
private_networking=yes
wait_timeout=600
register: do_droplet
# Or this? Personally, I like this better,
# and it also gets better highlighting from better yaml highlighters.
# gh's highlighter is pretty poor, sorry! Paste into vim!
- name: create droplet 512MB/Centos 7/Region NYC2
digital_ocean:
command: droplet
state: present
name: "{{ droplet_name }}"
client_id: "{{ client_id }}"
api_key: "{{ api_key }}"
size_id: 66
ssh_key_ids: "{{ do_droplet.ssh_key.id }}"
region_id: 4
image_id: 4856048
private_networking: yes
wait_timeout: 600
register: do_droplet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment