Hey so I am still getting familiar with Ansible so apologies if this is amateur stuff:
I have an array of servers which I need to execute a series of commands on. I enter:
ansible all -m command -a "sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo apt-get -y autoclean && sudo apt-get -y autoremove"
On all of the (remotely identical) servers I get the output:
`
server-name | FAILED | rc=100 >>
E: The update command takes no arguments
`
It of course seems that ansible can’t handle the concatated commands. Is this correct? Is there a workaround?
Thanks for any help