File not created in ansible -
i have installed ansible on 1 machine , trying execute commands on (remote) machinge.
- ansible installed
- able reach hosts (local , remote). tested ansible -m ping successful
- 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
Post a Comment