- name: raw module example
tasks:
- name: Move file on remote Windows Server from one location to another
raw: CMD /C "MOVE /Y D:\origen\prueba.txt D:\destino\prueba.txt"
RESULT:
.
.
.
.
fatal: [server.domain.is]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh.", "unreachable": true}
if i change to
- name: raw module example
hosts: windows
tasks:
- name: Move file on remote Windows Server from one location to another
raw: CMD /C "MOVE /Y D:\origen\prueba.txt D:\destino\prueba.txt"
RESULT:succesfull but all skipped
Using /etc/ansible/ansible.cfg as config file
SSH password:
Loaded callback default of type stdout, v2.0
PLAYBOOK: pruebaaitorwin.yml ***************************************************
1 plays in pruebaaitorwin.yml
PLAY [raw module example] ******************************************************
skipping: no hosts matched
PLAY RECAP *********************************************************************