Friday, June 4, 2021

Ansible Playbook to create or remove windows directory

Ansible Playbook to create or remove windows directory

---
- hosts: win
  tasks:
    - name: create directory
      win_file:
        path: 'c:\ry\ansibletest'
        state: directory

---
- hosts: win
  tasks:
    - name: create directory
      win_file:
        path: 'c:\ry\ansibletest'
        state: absent

No comments: