Estou tentando executar vários comandos shell em um ansible em um host remoto, mas falhando miseravelmente:
- name: Mkdir on server and copy packages locally
shell: |
mkdir /root/vdbench
cd /root
cp vdbench50403.zip /root/vdbench
cd /root/vdbench
unzip vdbench50403.zip
Erro:
TASK [Mkdir on server and copy packages locally] *******************************
fatal: [153.254.108.166]: FAILED! => {"changed": true, "cmd": "mkdir /root/vdbench\n cd /root\n cp vdbench50403.zip /root/vdbench\n cd /root/vdbench\n unzip vdbench50403.zip", "delta": "0:00:00.006011", "end": "2017-05-26 07:24:30.518445", "failed": true, "rc": 127, "start": "2017-05-26 07:24:30.512434", "stderr": "mkdir: cannot create directory ‘/root/vdbench’: File exists\n/bin/sh: line 4: unzip: command not found", "stdout": "", "stdout_lines": [], "warnings": ["Consider using file module with state=directory rather than running mkdir"]}
fatal: [153.254.108.165]: FAILED! => {"changed": true, "cmd": "mkdir /root/vdbench\n cd /root\n cp vdbench50403.zip /root/vdbench\n cd /root/vdbench\n unzip vdbench50403.zip", "delta": "0:00:00.005799", "end": "2017-05-26 07:24:30.740551", "failed": true, "rc": 127, "start": "2017-05-26 07:24:30.734752", "stderr": "mkdir: cannot create directory ‘/root/vdbench’: File exists\n/bin/sh: line 4: unzip: command not found", "stdout": "", "stdout_lines": [], "warnings": ["Consider using file module with state=directory rather than running mkdir"]}
fatal: [153.254.108.164]: FAILED! => {"changed": true, "cmd": "mkdir /root/vdbench\n cd /root\n cp vdbench50403.zip /root/vdbench\n cd /root/vdbench\n unzip vdbench50403.zip", "delta": "0:00:00.006032", "end": "2017-05-26 07:24:30.745565", "failed": true, "rc": 127, "start": "2017-05-26 07:24:30.739533", "stderr": "mkdir: cannot create directory ‘/root/vdbench’: File exists\n/bin/sh: line 4: unzip: command not found", "stdout": "", "stdout_lines": [], "warnings": ["Consider using file module with state=directory rather than running mkdir"]}
fatal: [153.254.108.163]: FAILED! => {"changed": true, "cmd": "mkdir /root/vdbench\n cd /root\n cp vdbench50403.zip /root/vdbench\n cd /root/vdbench\n unzip vdbench50403.zip", "delta": "0:00:00.006703", "end": "2017-05-26 07:24:30.832733", "failed": true, "rc": 127, "start": "2017-05-26 07:24:30.826030", "stderr": "mkdir: cannot create directory ‘/root/vdbench’: File exists\n/bin/sh: line 4: unzip: command not found", "stdout": "", "stdout_lines": [], "warnings": ["Consider using file module with state=directory rather than running mkdir"]}