I'm trying to run this command in a Amazon Linux AMI instance
- name: Run docker
shell: systemctl enable docker && systemctl start docker
And receiving this error message
"stderr": "/bin/sh: systemctl: No such file or directory"
I already tried with command
, ansible systemd module and /usr/bin/systemctl
.
command: which systemctl
andcommand: hostname
{"changed": false, "cmd": "wich systemctl", "msg": "[Errno 2] No such file or directory", "rc": 2}