We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Playbook:
tasks: - name: test commands: - name: echo-test script: echo $appname
Without sudo option script works fine:
run task "test", commands: 1 > sh -c 'appname="myapp"; echo $appname' > myapp completed command "echo-test" {script: sh -c 'appname="myapp"; echo $appname'} (244ms) completed task "test", commands: 1 (770ms)
With sudo option variable $appname is empty:
run task "test", commands: 1 > sudo sh -c "sh -c 'appname=\"myapp\"; echo $appname'" > completed command "echo-test" {script: sh -c 'appname="myapp"; echo $appname', sudo: true} (255ms) completed task "test", commands: 1 (769ms)
The text was updated successfully, but these errors were encountered:
it's because echo is built-in command. Use /bin/echo for this
echo
/bin/echo
Sorry, something went wrong.
pls check 1.9.2, it should be working for your case now
No branches or pull requests
Playbook:
Without sudo option script works fine:
With sudo option variable $appname is empty:
The text was updated successfully, but these errors were encountered: