File: main.yml

package info (click to toggle)
python-openstacksdk 4.7.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 13,904 kB
  • sloc: python: 127,036; sh: 153; makefile: 23
file content (123 lines) | stat: -rw-r--r-- 3,014 bytes parent folder | download | duplicates (8)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
---
- name: Create security group
  os_security_group:
     cloud: "{{ cloud }}"
     name: "{{ secgroup_name }}"
     state: present
     description: Created from Ansible playbook

- name: Create empty ICMP rule
  os_security_group_rule:
     cloud: "{{ cloud }}"
     security_group: "{{ secgroup_name }}"
     state: present
     protocol: icmp
     remote_ip_prefix: 0.0.0.0/0

- name: Create -1 ICMP rule
  os_security_group_rule:
     cloud: "{{ cloud }}"
     security_group: "{{ secgroup_name }}"
     state: present
     protocol: icmp
     port_range_min: -1
     port_range_max: -1
     remote_ip_prefix: 0.0.0.0/0

- name: Create empty TCP rule
  os_security_group_rule:
     cloud: "{{ cloud }}"
     security_group: "{{ secgroup_name }}"
     state: present
     protocol: tcp
     remote_ip_prefix: 0.0.0.0/0

- name: Create empty UDP rule
  os_security_group_rule:
     cloud: "{{ cloud }}"
     security_group: "{{ secgroup_name }}"
     state: present
     protocol: udp
     remote_ip_prefix: 0.0.0.0/0

- name: Create HTTP rule
  os_security_group_rule:
     cloud: "{{ cloud }}"
     security_group: "{{ secgroup_name }}"
     state: present
     protocol: tcp
     port_range_min: 80
     port_range_max: 80
     remote_ip_prefix: 0.0.0.0/0

- name: Create egress rule
  os_security_group_rule:
     cloud: "{{ cloud }}"
     security_group: "{{ secgroup_name }}"
     state: present
     protocol: tcp
     port_range_min: 30000
     port_range_max: 30001
     remote_ip_prefix: 0.0.0.0/0
     direction: egress

- name: Delete empty ICMP rule
  os_security_group_rule:
     cloud: "{{ cloud }}"
     security_group: "{{ secgroup_name }}"
     state: absent
     protocol: icmp
     remote_ip_prefix: 0.0.0.0/0

- name: Delete -1 ICMP rule
  os_security_group_rule:
     cloud: "{{ cloud }}"
     security_group: "{{ secgroup_name }}"
     state: absent
     protocol: icmp
     port_range_min: -1
     port_range_max: -1
     remote_ip_prefix: 0.0.0.0/0

- name: Delete empty TCP rule
  os_security_group_rule:
     cloud: "{{ cloud }}"
     security_group: "{{ secgroup_name }}"
     state: absent
     protocol: tcp
     remote_ip_prefix: 0.0.0.0/0

- name: Delete empty UDP rule
  os_security_group_rule:
     cloud: "{{ cloud }}"
     security_group: "{{ secgroup_name }}"
     state: absent
     protocol: udp
     remote_ip_prefix: 0.0.0.0/0

- name: Delete HTTP rule
  os_security_group_rule:
     cloud: "{{ cloud }}"
     security_group: "{{ secgroup_name }}"
     state: absent
     protocol: tcp
     port_range_min: 80
     port_range_max: 80
     remote_ip_prefix: 0.0.0.0/0

- name: Delete egress rule
  os_security_group_rule:
     cloud: "{{ cloud }}"
     security_group: "{{ secgroup_name }}"
     state: absent
     protocol: tcp
     port_range_min: 30000
     port_range_max: 30001
     remote_ip_prefix: 0.0.0.0/0
     direction: egress

- name: Delete security group
  os_security_group:
     cloud: "{{ cloud }}"
     name: "{{ secgroup_name }}"
     state: absent