Playbook looks ok, maybe something with spacing? On Wed, 21 Aug 2019 at 11:41, Manish Kumar <[email protected]> wrote: > > I have tried below playbook but getting error : > > ansible-playbook window.yml -i inventory.yml > ERROR! the field 'hosts' is required but was not set > > > Playbook contents: > > - name: test raw module > hosts: windows----------------> I think here is the problem . I tried with > ip but same error as i don't have domain name available in my personal > account . > tasks: > - name: run ipconfig > win_command: ipconfig > register: ipconfig > - debug: var=ipconfig > > > On Wednesday, August 21, 2019 at 2:46:07 PM UTC+5:30, Manish Kumar wrote: >> >> Hi, >> >> I am working on automation using ansible where in I need to connect to >> remote window server and install NT service . Please help me for the correct >> playbook as I have installed Winrm on window and connectivity is working >> from Linux -Ansible control server to window. >> >> ansible]$ ansible all -i inventory.yml -m win_ping >> 172.31.82.137 | SUCCESS => { >> "changed": false, >> "ping": "pong" >> } >> >> >> I need playbook for window service install. >> >> Thanks, >> Manish > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/0f9c5455-7489-44a7-8467-1f5ae031b79a%40googlegroups.com.
-- Dick Visser Trust & Identity Service Operations Manager GÉANT -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAL8fbwOh721BBtru-f7ruR8zTBANG__x%2B3v%3D3mZaeD68xW_6Fg%40mail.gmail.com.
