File tree 3 files changed +11
-6
lines changed
roles/configure_security_group/tasks
3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 79
79
80
80
- name : Print IBM Cloud Instance Floating IPs
81
81
debug :
82
- msg :
82
+ msg :
83
83
- " IC instance Floating IP: "
84
84
- " {{ ibmcloud_vsi_node }}"
85
85
143
143
144
144
- name : Add VM's to Isolated group
145
145
include_role :
146
- name : add_iso_hosts
146
+ name : add_iso_hosts
147
147
when : install_tower | default('True') | bool
148
148
149
149
- name : Print IBM Cloud Instance Floating IPs
150
150
debug :
151
- msg :
151
+ msg :
152
152
- " IC instance Floating IP: "
153
153
- " Isolated Nodes: {{ iso_node }}"
154
154
239
239
- name : Fetch the tower vars file
240
240
include_vars :
241
241
file : tower_vars.yml
242
-
242
+
243
243
- name : Fetch the vaulted variables
244
244
include_vars :
245
245
file : config/credential.vault
Original file line number Diff line number Diff line change 29
29
target : " {{ vsi.primary_network_interface[0]['id'] }}"
30
30
register : fip_create_output
31
31
32
- - name : Save Floating IPs
32
+ - name : Save Floating IPs
33
33
set_fact :
34
34
cacheable : True
35
35
ibmcloud_vsi_node : " {{ ibmcloud_vsi_node|default([]) + [fip_create_output.resource.address] }}"
Original file line number Diff line number Diff line change 1
1
---
2
- - name : " Configure Security Group Rule to open certain ports on the VSI"
2
+ - debug :
3
+ var : vpc.security_group
4
+
5
+ - name : " Configure Security Group Rule to open certain ports on the VSI when they don't exist"
3
6
ibm.cloudcollection.ibm_is_security_group_rule :
4
7
state : available
5
8
group : " {{ vpc.default_security_group }}"
10
13
- port_max : " {{ item }}"
11
14
port_min : " {{ item }}"
12
15
loop : " {{ list_of_ports }}"
16
+ when : vpc.security_group[0].rules|length < list_of_ports|length
13
17
14
18
- name : " Configure Security Group Rule to open icmp on the VSI"
15
19
ibm.cloudcollection.ibm_is_security_group_rule :
20
24
remote : 0.0.0.0/0
21
25
icmp :
22
26
- type : 8
27
+ when : vpc.security_group[0].rules|length < list_of_ports|length
You can’t perform that action at this time.
0 commit comments