mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix include test to keep type
This commit is contained in:
parent
974731bec0
commit
3ccc2ae299
1 changed files with 17 additions and 1 deletions
|
@ -26,13 +26,29 @@
|
||||||
- "cb == '2'"
|
- "cb == '2'"
|
||||||
- "cc == '3'"
|
- "cc == '3'"
|
||||||
|
|
||||||
|
# Fact takes precedence over include param as fact is host-specific
|
||||||
- set_fact:
|
- set_fact:
|
||||||
a: 101
|
a: 101
|
||||||
b: 102
|
b: 102
|
||||||
c: 103
|
c: 103
|
||||||
|
|
||||||
- include: included_task1.yml a={{a}} b={{b}} c=103
|
- include: included_task1.yml a={{a}} b={{b}} c=103
|
||||||
|
|
||||||
|
- name: verify variable include params
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- "ca == 101"
|
||||||
|
- "cb == 102"
|
||||||
|
- "cc == 103"
|
||||||
|
|
||||||
|
# Test that strings are not turned into numbers
|
||||||
|
- set_fact:
|
||||||
|
a: "101"
|
||||||
|
b: "102"
|
||||||
|
c: "103"
|
||||||
|
|
||||||
|
- include: included_task1.yml a={{a}} b={{b}} c=103
|
||||||
|
|
||||||
- name: verify variable include params
|
- name: verify variable include params
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
|
Loading…
Reference in a new issue