Allow using multiple remote IP prefixes for security groups 52/116552/2
authorPawel Wieczorek <p.wieczorek2@samsung.com>
Wed, 30 Dec 2020 14:21:11 +0000 (15:21 +0100)
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>
Thu, 7 Jan 2021 10:34:50 +0000 (10:34 +0000)
This patch is required for allowing machine-to-machine traffic within
ONAP cluster with no Vagrant operator involvement.

Issue-ID: INT-1601
Change-Id: I0159b3176ecb3e5783f4f87b9b507824fc411b2b
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
deployment/noheat/infra-openstack/ansible/group_vars/all.yml.sample
deployment/noheat/infra-openstack/ansible/group_vars/all.yml.sm-onap
deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_securitygroup/tasks/create_securitygroup.yml
deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_securitygroup/tasks/main.yml

index c2d551d..7ca72de 100644 (file)
@@ -8,7 +8,9 @@ keypair:
 
 securitygroup:
   name: &securitygroup_name "onap_ci_lab"
-  remote_ip_prefix: "172.24.4.0/24"
+  remote_ip_prefix:
+    - "172.24.4.0/24"
+    - "192.168.1.0/24"
 
 image:
   name: &image_name "Ubuntu_18.04"
index c6ded56..e3ae6b3 100644 (file)
@@ -8,7 +8,8 @@ keypair:
 
 securitygroup:
   name: &securitygroup_name "onap_ci_lab"
-  remote_ip_prefix: "0.0.0.0/0"
+  remote_ip_prefix:
+    - "0.0.0.0/0"
 
 image:
   name: &image_name "Ubuntu_18.04"
index d6b78d1..bd8abf5 100644 (file)
@@ -8,7 +8,8 @@
   os_security_group_rule:
     security_group: "{{ secgrp.name }}"
     protocol: icmp
-    remote_ip_prefix: "{{ secgrp.remote_ip_prefix }}"
+    remote_ip_prefix: "{{ item }}"
+  loop: "{{ secgrp.remote_ip_prefix }}"
 
 - name: "Create {{ secgrp.name }} security group rule for SSH"
   os_security_group_rule:
@@ -16,4 +17,5 @@
     protocol: tcp
     port_range_min: 22
     port_range_max: 22
-    remote_ip_prefix: "{{ secgrp.remote_ip_prefix }}"
+    remote_ip_prefix: "{{ item }}"
+  loop: "{{ secgrp.remote_ip_prefix }}"