File: main.yml

package info (click to toggle)
python-openstacksdk 4.7.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,904 kB
  • sloc: python: 127,036; sh: 153; makefile: 23
file content (43 lines) | stat: -rw-r--r-- 1,029 bytes parent folder | download | duplicates (4)
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
---
- name: Create network {{ network_name }}
  os_network:
    cloud: "{{ cloud }}"
    name: "{{ network_name }}"
    state: present

- name: Create subnet {{ subnet_name }} on network {{ network_name }}
  os_subnet:
    cloud: "{{ cloud }}"
    network_name: "{{ network_name }}"
    name: "{{ subnet_name }}"
    state: present
    enable_dhcp: "{{ enable_subnet_dhcp }}"
    dns_nameservers:
      - 8.8.8.7
      - 8.8.8.8
    cidr: 192.168.0.0/24
    gateway_ip: 192.168.0.1
    allocation_pool_start: 192.168.0.2
    allocation_pool_end: 192.168.0.254

- name: Update subnet
  os_subnet:
    cloud: "{{ cloud }}"
    network_name: "{{ network_name }}"
    name: "{{ subnet_name }}"
    state: present
    dns_nameservers:
      - 8.8.8.7
    cidr: 192.168.0.0/24

- name: Delete subnet {{ subnet_name }}
  os_subnet:
    cloud: "{{ cloud }}"
    name: "{{ subnet_name }}"
    state: absent

- name: Delete network {{ network_name }}
  os_network:
    cloud: "{{ cloud }}"
    name: "{{ network_name }}"
    state: absent