Reputation: 53
I'm trying to run an adhoc find
command in ansible to look for myFile.txt
but it's giving me an unknown hosts
error. What am I doing wrong?
ansible all -m file -a patterns="myFile.txt" paths="/home/user/Documents"
Upvotes: 1
Views: 977
Reputation: 53
Combine all arguments into one parameter. Note the single quotes. If you use double quotes, you must escape them
ansible all -m find -a "patterns='myFile.txt' paths='/home/user/Documents'"
or
ansible all -m find -a "patterns=\"myFile.txt\" paths=\"/home/user/Documents\"
Upvotes: 2