File not created in ansible -


i have installed ansible on 1 machine , trying execute commands on (remote) machinge.

  1. ansible installed
  2. able reach hosts (local , remote). tested ansible -m ping successful
  3. trying execute simple command again ansible -a 'echo "hello world" > ~/test' executed successfuly. file test not created.

cannot find reason why?

executing command via ansible -a equivalent command module, see command module. not processed via shell, therefore, >> (as other redirection operators) , $home not available

in case use

ansible -m 'shell' --args 'echo "hello world">>/home/ansibleremoteuser/test' 

in case use shell module allows redirections.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -