mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Add an additional way to dereference a variable in a playbook, $foo
(Using varReplace function originally from yum, thanks Seth)
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
[
|
||||
"task start",
|
||||
[
|
||||
"test basic shell",
|
||||
"test basic shell, plus two ways to dereference a variable",
|
||||
false
|
||||
]
|
||||
],
|
||||
@@ -61,10 +61,10 @@
|
||||
[
|
||||
"127.0.0.1",
|
||||
{
|
||||
"cmd": "echo $HOME ",
|
||||
"cmd": "echo $HOME 5150 5150 ",
|
||||
"rc": 0,
|
||||
"stderr": "",
|
||||
"stdout": "/root"
|
||||
"stdout": "/root 5150 5150"
|
||||
}
|
||||
]
|
||||
],
|
||||
@@ -200,4 +200,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
- name: test basic success command 2
|
||||
action: command /bin/true
|
||||
|
||||
- name: test basic shell
|
||||
action: shell echo $HOME
|
||||
- name: test basic shell, plus two ways to dereference a variable
|
||||
action: shell echo $HOME $port {{ port }}
|
||||
|
||||
# in the command below, the test file should contain a valid template
|
||||
# and trigger the change handler
|
||||
|
||||
Reference in New Issue
Block a user