mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-28 13:33:57 +00:00
tests: Use vars: with include_tasks
Specifying vars as foo=bar does not work anymore with Ansible 2.7. Specify the vars using a dictionary instead. This fixes #89
This commit is contained in:
parent
eb6b954e32
commit
207d31b4d0
2 changed files with 10 additions and 3 deletions
|
|
@ -19,7 +19,9 @@
|
|||
type: "{{ type }}"
|
||||
interface: "{{ interface }}"
|
||||
- include_tasks: tasks/show-interfaces.yml
|
||||
- include_tasks: tasks/manage-test-interface.yml state=present
|
||||
- include_tasks: tasks/manage-test-interface.yml
|
||||
vars:
|
||||
state: present
|
||||
- include_tasks: tasks/assert-device_present.yml
|
||||
|
||||
- name: Test static interface up
|
||||
|
|
@ -54,5 +56,7 @@
|
|||
- name: Remove interfaces
|
||||
hosts: all
|
||||
tasks:
|
||||
- include_tasks: tasks/manage-test-interface.yml state=absent
|
||||
- include_tasks: tasks/manage-test-interface.yml
|
||||
vars:
|
||||
state: absent
|
||||
- include_tasks: tasks/assert-device_absent.yml
|
||||
|
|
|
|||
|
|
@ -17,7 +17,10 @@
|
|||
|
||||
# FIXME: when: does not seem to work with include_tasks, therefore this cannot be safely tested for now
|
||||
# - name: test tap interfaces
|
||||
# include_tasks: tasks/create-and-remove-interface.yml type=tap interface=tap1298
|
||||
# include_tasks: tasks/create-and-remove-interface.yml
|
||||
# vars:
|
||||
# - type: tap
|
||||
# - interface: tap1298
|
||||
# when: ansible_distribution_major_version > 6
|
||||
# # ip tuntap does not exist on RHEL6
|
||||
# # FIXME: Maybe use some other tool to manage devices, openvpn can do this,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue