FAQ
Should that not be pointing to a "{{ $var }}" then? How does the task look
to start with? This is just the output :)

Op zondag 1 maart 2015 23:15:43 UTC+1 schreef xin zhang:
I use script task to change mysql password by mysqladmin; when the
password is an empty string(''), the script task strips it and leads
ansible hang because mysqladmin will prompt for a password

TASK: *[script /usr/bin/mysqladmin -u root password ''*]
************************
<192.168.0.214> ESTABLISH CONNECTION FOR USER: root on PORT 22 TO
192.168.0.214
<192.168.0.214> EXEC /bin/sh -c 'mkdir -p
$HOME/.ansible/tmp/ansible-tmp-1462733147.95-186442598016946 && echo
$HOME/.ansible/tmp/ansible-tmp-1462733147.95-186442598016946'
<192.168.0.214> PUT /usr/bin/mysqladmin TO
/root/.ansible/tmp/ansible-tmp-1462733147.95-186442598016946/mysqladmin
<192.168.0.214> EXEC /bin/sh -c 'chmod +rx
/root/.ansible/tmp/ansible-tmp-1462733147.95-186442598016946/mysqladmin'
<192.168.0.214> EXEC
/root/.ansible/tmp/ansible-tmp-1462733147.95-186442598016946/mysqladmin -u
root password

see command marked in blue does have a "" at last, but the real command in
red strips it.

How can I handle such case?
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4187b500-015b-4968-b623-320b07b94d40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 7 | next ›
Discussion Overview
groupansible-project @
postedMar 1, '15 at 10:15p
activeMar 2, '15 at 7:31a
posts7
users2

2 users in discussion

Xin zhang: 4 posts Erik-jan Riemers: 3 posts

People

Translate

site design / logo © 2022 Grokbase