mirror of
https://github.com/trailofbits/algo
synced 2024-11-10 01:11:07 +00:00
ipv6 option is available in ansible 2.2; Fixed #158
This commit is contained in:
parent
37ec574d8d
commit
275663264a
@ -1,40 +0,0 @@
|
||||
- name: Enable IPv6 on the droplet
|
||||
local_action:
|
||||
module: uri
|
||||
url: "https://api.digitalocean.com/v2/droplets/{{ do_droplet_id }}/actions"
|
||||
method: POST
|
||||
body:
|
||||
type: enable_ipv6
|
||||
body_format: json
|
||||
status_code: 201
|
||||
HEADER_Authorization: "Bearer {{ do_access_token }}"
|
||||
HEADER_Content-Type: "application/json"
|
||||
become: no
|
||||
|
||||
- name: Get Droplet networks
|
||||
local_action:
|
||||
module: uri
|
||||
url: "https://api.digitalocean.com/v2/droplets/{{ do_droplet_id }}"
|
||||
method: GET
|
||||
status_code: 200
|
||||
HEADER_Authorization: "Bearer {{ do_access_token }}"
|
||||
HEADER_Content-Type: "application/json"
|
||||
register: droplet_info
|
||||
become: no
|
||||
|
||||
- name: IPv6 configured
|
||||
template: src=roles/cloud-digitalocean/templates/20-ipv6.cfg.j2 dest=/etc/network/interfaces.d/20-ipv6.cfg owner=root group=root mode=0644
|
||||
with_items: "{{ droplet_info.json.droplet.networks.v6 }}"
|
||||
notify:
|
||||
- reload eth0
|
||||
|
||||
- name: IPv6 included into the network config
|
||||
lineinfile: dest=/etc/network/interfaces line='source /etc/network/interfaces.d/20-ipv6.cfg' state=present
|
||||
notify:
|
||||
- reload eth0
|
||||
|
||||
- meta: flush_handlers
|
||||
|
||||
- name: Wait for SSH to become available
|
||||
local_action: "wait_for port=22 host={{ inventory_hostname }} timeout=320"
|
||||
become: false
|
@ -21,6 +21,7 @@
|
||||
ssh_key_ids: "{{ do_ssh_key.ssh_key.id }}"
|
||||
unique_name: yes
|
||||
api_token: "{{ do_access_token }}"
|
||||
ipv6: yes
|
||||
register: do
|
||||
|
||||
- name: Add the droplet to an inventory group
|
||||
|
Loading…
Reference in New Issue
Block a user