Replace neutron module with os_network and os_subnet

The neutron library has been removed[0] in openstack-ansible-plugins.
We can use standard ansible module instead.

[0]https://review.openstack.org/#/c/467797/

Change-Id: Ia30a72bcd3d112d7dce7ebe4cdf5da659b983808
Closes-Bug: #1700700
This commit is contained in:
ZhongShengping 2017-06-27 10:13:31 +08:00
parent 8b5ade5a67
commit c7a1f783a0

View File

@ -20,28 +20,31 @@
tasks: tasks:
- name: Install pip requirements - name: Install pip requirements
pip: pip:
name: "python-neutronclient" name: "{{ item }}"
state: "{{ ironic_pip_package_state }}" state: "{{ ironic_pip_package_state }}"
with_items:
- python-neutronclient
- shade
register: install_packages register: install_packages
until: install_packages|success until: install_packages|success
retries: 5 retries: 5
delay: 2 delay: 2
- name: Create br-prov network - name: Create br-prov network
neutron: os_network:
command: create_network cloud: default
openrc_path: /root/openrc endpoint_type: internal
net_name: "{{ ironic_neutron_provisioning_network_name }}" validate_certs: "{{ not keystone_service_internaluri_insecure | bool }}"
name: "{{ ironic_neutron_provisioning_network_name }}"
provider_network_type: flat provider_network_type: flat
provider_physical_network: prov provider_physical_network: prov
insecure: "{{ keystone_service_internaluri_insecure }}"
- name: Ensure public subnet exists - name: Ensure public subnet exists
neutron: os_subnet:
command: create_subnet state: present
openrc_path: /root/openrc cloud: default
net_name: "{{ ironic_neutron_provisioning_network_name }}" endpoint_type: internal
subnet_name: "ironic-prov-subnet" validate_certs: "{{ not keystone_service_internaluri_insecure | bool }}"
network_name: "{{ ironic_neutron_provisioning_network_name }}"
name: "ironic-prov-subnet"
cidr: "10.1.6.0/24" cidr: "10.1.6.0/24"
insecure: "{{ keystone_service_internaluri_insecure }}"
allocation_pools: ""
vars_files: vars_files:
- common/test-vars.yml - common/test-vars.yml