Skip to content

Commit c43b1c7

Browse files
authored
Remove unused variables runtime/tasks/initialize_setup_gcp.yml (#148)
Signed-off-by: Jesus Perez Rey <jprey@bluemetrix.com>
1 parent da16413 commit c43b1c7

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

roles/runtime/tasks/initialize_setup_gcp.yml

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,3 @@
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
16-
17-
- name: Discover GCP VPC
18-
google.cloud.gcp_compute_network_info:
19-
project: "{{ run__gcp_project }}"
20-
filters:
21-
- name = "{{ run__vpc_name }}"
22-
register: __gcp_vpc_discovered
23-
24-
- name: Set GCP VPC Details
25-
when:
26-
- __gcp_vpc_discovered is defined
27-
- __gcp_vpc_discovered.resources is defined
28-
- __gcp_vpc_discovered.resources | length > 0
29-
ansible.builtin.set_fact:
30-
run__gcp_vpc_discovered: "{{ __gcp_vpc_discovered.resources[0] }}"
31-
32-
# GCP Filter by network name doesn't seem to work with the Ansible Collection, thus the below construction
33-
- name: Discover GCP Subnets
34-
when:
35-
- run__gcp_vpc_discovered is defined
36-
- run__gcp_vpc_discovered | length > 0
37-
register: __gcp_subnets_discovered
38-
google.cloud.gcp_compute_subnetwork_info:
39-
region: "{{ run__region }}"
40-
filters:
41-
- "name = {{ run__namespace }}*"
42-
project: "{{ run__gcp_project }}"
43-
44-
# TODO Refactor to follow AWS discovery/assignment process
45-
- name: Set GCP Subnet Details
46-
when:
47-
- __gcp_subnets_discovered is defined
48-
- __gcp_subnets_discovered.resources is defined
49-
- __gcp_subnets_discovered.resources | length > 0
50-
#- __gcp_subnet_item.selfLink in run__gcp_vpc_discovered.subnetworks
51-
ansible.builtin.set_fact:
52-
run__datahub_subnet_ids: "{{ __gcp_subnets_discovered | community.general.json_query('resources[*].name') }}"

0 commit comments

Comments
 (0)