diff options
author | 2020-06-15 16:29:35 +0200 | |
---|---|---|
committer | 2020-07-30 09:02:56 +0000 | |
commit | a879e2a54e0641b692202d417021f1824032b123 (patch) | |
tree | bfd772a87544023cbe0315eebaa69d1fcaac6256 /deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_network/tasks/create_network.yml | |
parent | 3d9bd5abfcb9bf55e3dd1b53cb3b6bc4bd45c0d1 (diff) |
Add Ansible roles for OpenStack network
This patch also adds Vagrant provisioners for creating and destroying
OpenStack infrastructure. These are set to never run (unless explicitly
called by the operator) because DevStack instance on a separate machine
might not be ready to provide OpenStack API.
This patch is based on previous work by:
Krzysztof Opasiak <k.opasiak@samsung.com>
Test harness is based on blog post [1] by:
Chris Morgan <me@chrismorgan.info>
[1] https://chrismorgan.info/blog/make-and-git-diff-test-harness
Issue-ID: INT-1601
Change-Id: I031ca7a5a43cca0258dc0dc9e0339182c431898a
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
Diffstat (limited to 'deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_network/tasks/create_network.yml')
-rw-r--r-- | deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_network/tasks/create_network.yml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_network/tasks/create_network.yml b/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_network/tasks/create_network.yml new file mode 100644 index 000000000..5d86858c1 --- /dev/null +++ b/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_network/tasks/create_network.yml @@ -0,0 +1,20 @@ +--- +- name: "Create {{ net.name }} network" + os_network: + name: "{{ net.name }}" + state: present + +- name: "Create {{ net.name }} subnet" + os_subnet: + name: "{{ net.name }}_subnet" + network_name: "{{ net.name }}" + cidr: "{{ net.cidr }}" + state: present + +- name: "Create {{ net.name }} router" + os_router: + name: "{{ net.name }}_router" + network: public + interfaces: + - "{{ net.name }}_subnet" + state: present |