Remove public IPs after deployment
This commit is contained in:
parent
c822168ea2
commit
bf54e16aef
12
ansible/group_vars/all
Normal file
12
ansible/group_vars/all
Normal file
@ -0,0 +1,12 @@
|
||||
terraform_vars:
|
||||
location: "nbg1"
|
||||
network_zone: "eu-central"
|
||||
server_count: 3
|
||||
subnetwork_ip_range: "10.0.0.0/24"
|
||||
lb_internal_ip: "10.0.0.100"
|
||||
lb_external_ip: "167.235.105.161"
|
||||
lb_service_id: 1399502
|
||||
public_ipv4: True
|
||||
ssh_keys:
|
||||
- "rothe.pub"
|
||||
- "alt.pub"
|
@ -8,17 +8,7 @@
|
||||
project_path: ../terraform/
|
||||
state: present
|
||||
complex_vars: true
|
||||
variables:
|
||||
location: "nbg1"
|
||||
network_zone: "eu-central"
|
||||
server_count: 3
|
||||
subnetwork_ip_range: "10.0.0.0/24"
|
||||
lb_internal_ip: "10.0.0.100"
|
||||
lb_external_ip: "167.235.105.161"
|
||||
lb_service_id: 1399502
|
||||
ssh_keys:
|
||||
- "rothe.pub"
|
||||
- "alt.pub"
|
||||
variables: "{{ terraform_vars }}"
|
||||
register: tf_out
|
||||
|
||||
- debug: var=tf_out
|
||||
@ -78,3 +68,17 @@
|
||||
- php
|
||||
- glusterfs
|
||||
- wordpress
|
||||
|
||||
- name: Remove public IP
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Remove public Ip
|
||||
community.general.terraform:
|
||||
project_path: ../terraform/
|
||||
state: present
|
||||
complex_vars: true
|
||||
variables: "{{ terraform_vars | combine({'public_ipv4': False}) }}"
|
||||
register: tf_out
|
||||
|
||||
- debug: var=tf_out
|
||||
|
Loading…
x
Reference in New Issue
Block a user