Skip to content

Commit 2a07fb8

Browse files
committed
tests: Avoid facts vars with import_playbook
This does not work any more with Ansible 2.19. The cleanup helpers were already fixed more thoroughly in the previous commit, but the remaining helpers which take a more general "profile" value are justified. Set the `profile` value globally in the playbook instead of at `import_playbook` time, like many other tests already do. Signed-off-by: Martin Pitt <[email protected]>
1 parent 14f80e5 commit 2a07fb8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/playbooks/tests_bridge.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- name: "Set interface={{ interface }}"
1010
set_fact:
1111
interface: "{{ interface }}"
12+
profile: "{{ interface }}"
1213
- name: Include the task 'show_interfaces.yml'
1314
include_tasks: tasks/show_interfaces.yml
1415
- name: Include the task 'assert_device_absent.yml'
@@ -36,7 +37,6 @@
3637
- name: Import the playbook 'run_tasks.yml'
3738
import_playbook: run_tasks.yml
3839
vars:
39-
profile: "{{ interface }}"
4040
task: tasks/assert_profile_present.yml
4141

4242
- name: Import the playbook 'down+delete_interface.yml'
@@ -49,7 +49,6 @@
4949
- name: Import the playbook 'run_tasks.yml'
5050
import_playbook: run_tasks.yml
5151
vars:
52-
profile: "{{ interface }}"
5352
task: tasks/assert_profile_absent.yml
5453

5554
- name: Import the playbook 'run_tasks.yml'

0 commit comments

Comments
 (0)