On Sat, 8 Feb 2014, Naoko Reeves wrote:
I am trying to rename folder that is unpacked. So I can only get file name
accurately with grep (or some sort of regex expression)
via ansible, the following command fails with the error message: stderr:
mv: cannot stat `/var/www/`ls /var/www/ | grep client`': No such file or
directory
command mv "/var/www/`ls /var/www/ | grep client`" "/var/www/gd_new"
however, exact command works just fine when executed on server
I try to use mv "var/www/client*" "/var/www/gd_new", with xargs with
pipe... all end up with similar error...
any guidance would be appreciated.
Substitute "command" by "shell". The shell module allows to do piping,
backticks, globs, etc.. The command module does not do any of those things
and can only be used for a single static command line.
--
-- dag wieers, [email protected], http://dag.wieers.com/
-- dagit linux solutions, [email protected], http://dagit.net/
[Any errors in spelling, tact or fact are transmission errors]
--
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 [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.