--- # This playbook uses various Windows modules to test their functionality - name: test raw module hosts: windows tasks: - name: run ipconfig raw: ipconfig register: ipconfig - debug: var=ipconfig - name: test stat module hosts: windows tasks: - name: test stat module on file win_stat: path="C:/Windows/win.ini" register: stat_file - debug: var=stat_file - name: check stat_file result assert: that: - "stat_file.stat.exists" - "not stat_file.stat.isdir" - "stat_file.stat.size > 0" - "stat_file.stat.md5" - name: Add a user hosts: all gather_facts: false tasks: - name: Add User win_user: name: ansible password: "@ns1bl3"