aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/noheat/infra-openstack/ansible/roles/create_securitygroup/tasks/create_securitygroup.yml
blob: b9a3e297330a55afb525297795185237931ada6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
- 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 all TCP"
  os_security_group_rule:
    security_group: "{{ secgrp.name }}"
    protocol: tcp
    remote_ip_prefix: "0.0.0.0/0"

- name: "Create {{ secgrp.name }} security group rule for all UDP"
  os_security_group_rule:
    security_group: "{{ secgrp.name }}"
    protocol: udp