Hi Team ,
I am trying to restart the spooler service in windows remotely by creating playbooks in RHEL Operating system .its trowing below error.kindly suggest me to resolve this issue.
playbook content :
---
- name: Restart a service
win_service:
name: spooler
state: restarted
ERROR is :
[root@Amaster ansible]# ansible-playbook restart_spool_service.yml
ERROR! 'win_service' is not a valid attribute for a Play
The error appears to have been in '/etc/ansible/restart_spool_service.yml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
---
- name: Restart a service
^ here
Thanks & Regards,
Suma