Hi ,
As i have created two simple playbook to remove file from window system and
create the file on window system.
But getting error while i execute the both playbook. (Ansible controller
version is 2.9)
1. remove_file.yml
---
- name: remove a file (check mode)
hosts: win
win_package:
path: C:\ansible_wu.txt
state: absent
register: remove_file_check
check_mode: yes
***************************************************
Error-
***************************************************
ERROR! 'win_package' is not a valid attribute for a Play
The error appears to be in '/home/ansible/rx_testing/win_remove_file.yml':
line 2, column 4, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
---
- name: remove a file (check mode)
^ here
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2. touch.yml
---
- hosts: win
name: Create the file
win_file:
path: C:\amit.txt
state: touch
_________________
Error
------------------------------
ERROR! 'win_file' is not a valid attribute for a Play
The error appears to be in '/home/ansible/rx_testing/win_touch.yml': line
2, column 4, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
---
- hosts: win
^ here
*************************************************************************
Regards
Amit
--
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/41963f29-5fd4-4d6e-b2db-f063ae6361e7%40googlegroups.com.