Ansible Windows Filament

From tannerjc wiki
Jump to: navigation, search


This document is geared towards Ansible developers and users who are debugging or testing Windows.


  1. vagrant
  2. virtualbox
  3. ansible

Initial Setup

  1. install ansible
  2. pip install git+
  3. git clone
  4. cd ansible-windows/vagrant
  5. edit the inventory.yml file and comment out all "domain_children" hosts except for the "SERVER2016" host.
  7. vagrant up

Once the boxes are downloaded and provisioned, a connection test should fire off in one of the tasks. If you notice it hanging, login to each of the VMs and run this command in an administrator powershell: `Reset-WinRMConfig`

  1. ansible SERVER2016 -vvvvv -i inventory.yml -m win_ping

Switching to kerberos [mac]

  1. pip install pywinrm[kerberos]
  2. pip install pexpect
  3. echo "nameserver" > /etc/resolver/domain.local
  4. set "ansible_winrm_transport" to "kerberos" in inventory.yml
  5. set "ansible_user" to "vagrant-domain@DOMAIN.LOCAL" in inventory.yml
  6. set "ansible_password" to "VagrantPass1" in inventory.yml
  7. export KRB5_TRACE=/dev/stdout
  8. ansible SERVER2016 -vvvvv -i inventory.yml -m win_ping