aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/noheat/infra-openstack/ansible/roles/create_securitygroup/tasks/create_securitygroup.yml
blob: f389559ec96fb58ff9120dc1fc9c8c1e130a279e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
- name: "Create {{ secgrp.name }} security group"
  os_security_group:
    state: present
    name: "{{ secgrp.name }}"

- name: "Create {{ secgrp.name }} security group rule for ping"
  os_security_group_rule:
    security_group: "{{ secgrp.name }}"
    protocol: icmp
    remote_ip_prefix: "{{ item }}"
  loop: "{{ secgrp.remote_ip_prefix }}"

- name: "Create {{ secgrp.name }} security group rule for SSH"
  os_security_group_rule:
    security_group: "{{ secgrp.name }}"
    protocol: tcp
    port_range_min: 22
    port_range_max: 22
    remote_ip_prefix: "{{ item }}"
  loop: "{{ secgrp.remote_ip_prefix }}"

- name: "Create {{ secgrp.name }} security group rule for ONAP Docker registry"
  os_security_group_rule:
    security_group: "{{ secgrp.name }}"
    protocol: tcp
    port_range_min: 10001
    port_range_max: 10001
    remote_ip_prefix: "{{ item }}"
  loop: "{{ secgrp.local_ip_prefix }}"