Add new tasks to os_port playbook

The allowed_address_pairs and extra_dhcp_opts parameters were
broken in Ansible. We should make sure those are tested.

NOTE: This will not pass tests until this merges and gets released:

  https://github.com/ansible/ansible-modules-core/pull/3303

Change-Id: I51ceb5305109f6f1c4f1890903f117a9ed250d56
This commit is contained in:
David Shrewsbury
2016-03-22 08:33:30 -04:00
parent e6b60d99c8
commit e41dabb10c

View File

@@ -60,6 +60,28 @@
state: absent
name: "{{ port_name }}"
- name: Create port (with allowed_address_pairs and extra_dhcp_opts)
os_port:
cloud: "{{ cloud }}"
state: present
name: "{{ port_name }}"
network: "{{ network_name }}"
no_security_groups: True
allowed_address_pairs:
- ip_address: 10.6.7.0/24
extra_dhcp_opts:
- opt_name: "bootfile-name"
opt_value: "testfile.1"
register: port
- debug: var=port
- name: Delete port (with allowed_address_pairs and extra_dhcp_opts)
os_port:
cloud: "{{ cloud }}"
state: absent
name: "{{ port_name }}"
- name: Delete security group
os_security_group:
cloud: "{{ cloud }}"