mirror of
https://github.com/trailofbits/algo.git
synced 2025-04-11 11:47:08 +02:00
parent
b29b310ff3
commit
e416e76ce8
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,6 @@
|
|||
skip_list:
|
||||
- '204'
|
||||
verbosity: 1
|
||||
|
||||
warn_list:
|
||||
- no-changed-when
|
||||
|
|
|
@ -26,12 +26,16 @@
|
|||
- Environment:Algo
|
||||
register: digital_ocean_droplet
|
||||
|
||||
# Return data is not idempotent
|
||||
- set_fact:
|
||||
droplet: "{{ digital_ocean_droplet.data.droplet | default(digital_ocean_droplet.data) }}"
|
||||
|
||||
- block:
|
||||
- name: "Create a Floating IP"
|
||||
digital_ocean_floating_ip:
|
||||
state: present
|
||||
oauth_token: "{{ algo_do_token }}"
|
||||
droplet_id: "{{ digital_ocean_droplet.data.droplet.id }}"
|
||||
droplet_id: "{{ droplet.id }}"
|
||||
register: digital_ocean_floating_ip
|
||||
|
||||
- name: Set the static ip as a fact
|
||||
|
@ -40,7 +44,7 @@
|
|||
when: alternative_ingress_ip
|
||||
|
||||
- set_fact:
|
||||
cloud_instance_ip: "{{ digital_ocean_droplet.data.droplet.networks.v4.0.ip_address }}"
|
||||
cloud_instance_ip: "{{ (droplet.networks.v4 | selectattr('type', '==', 'public')).0.ip_address }}"
|
||||
ansible_ssh_user: algo
|
||||
ansible_ssh_port: "{{ ssh_port }}"
|
||||
cloudinit: true
|
||||
|
|
Loading…
Add table
Reference in a new issue