I want to execute a few tasks on the managed nodes. I connected to a linux server, controller node. I want to run a playbook which has some AWS RDS CLI commands with jq (Run the command, store it in S3 and copy the output on all the managed nodes). Does all the managed nodes have AWS CLI and jq installed & configured? I assume that’s not the case.
Unless there is a specific need to run those commands from the target host itself, you can delegate_to: localhost
and just have the requirements on the controller. This is common with service/web/http API based modules, since you are normally contacting a site/service that is normally accessible from anywhere, not just the target host.
I ran it. It throws an error, no such file or directory b’aws’
I you need help with a specific task/error you normally wan to post both the task and the -vvv output. In any case, if you are calling a command (aws
in this case) it needs to be installed the machine you execute the action on and accessible by the user executing the action.
Thank you. That’s what my initial question. “Does all the managed nodes have AWS CLI and jq installed & configured?”
Sorry, I had misunderstood the question, as the phrasing was off, I interpreted as if it is required, not that if it is actually already installed by Ansible.
Ansible does not install or setup anything by default, you need to instruct it to do so.