Just want to ask a quick question...
Tried to do the following with the web.config file but keep getting errors.
---
- name: Check Web.config file
hosts: all
tasks:
- name: stat the Web.config file
win_stat:
path: C:\Websites\Live\Web.config
register: file_info
---
- name: Check Web.config file
hosts: all
tasks:
- name: stat the Web.config file
win_stat:
path: C:\Websites\Live\Web.config
register: Web.config_fileinfo
---
- name: Check Web.config file
hosts: all
tasks:
- name: stat the Web.config file
win_stat:
path: C:\Websites\Live\Web
register: Web_fileinfo
But its not giving me an information...just the following result:
PLAY [Check Web.config file] ***************************************************
TASK [setup] *******************************************************************
ok: [10.10.3.168]
ok: [10.10.3.167]
ok: [10.10.3.170]
TASK [stat the Web.config file] ************************************************
ok: [10.10.3.170]
ok: [10.10.3.168]
ok: [10.10.3.167]
PLAY RECAP *********************************************************************
10.10.3.167 : ok=2 changed=0 unreachable=0 failed=0
10.10.3.168 : ok=2 changed=0 unreachable=0 failed=0
10.10.3.170 : ok=2 changed=0 unreachable=0 failed=0
Is there another way of getting the stats from that file so that I can do the same playbook as the pne you suggested for the hosts file?