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:
Michael DeHaan
2012-03-19 19:32:38 -04:00
parent af9596307d
commit 5ed2b894d9
3 changed files with 39 additions and 6 deletions

View File

@@ -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 @@
}
}
}

View File

@@ -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