Skip to content

Instantly share code, notes, and snippets.

@christonog
Created August 7, 2019 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christonog/67d1f3a5ea189c9127f5570803b0f11a to your computer and use it in GitHub Desktop.
Save christonog/67d1f3a5ea189c9127f5570803b0f11a to your computer and use it in GitHub Desktop.
winrm support
def get_ansible_host(config, inventory, host, ssh_config=None,
ssh_identity_file=None):
if is_empty_inventory(inventory):
return testinfra.get_host('local://')
hostvars = inventory['_meta'].get('hostvars', {}).get(host, {})
connection = hostvars.get('ansible_connection', 'ssh')
if connection not in ('ssh', 'local', 'docker', 'lxc', 'lxd'):
wrote pytestdebug information to /roles/test-windows-config/molecule/windows/pytestdebug.log
raise NotImplementedError(
> 'unhandled ansible_connection {}'.format(connection))
E NotImplementedError: unhandled ansible_connection winrm
/usr/lib/python2.7/site-packages/testinfra/utils/ansible_runner.py:71: NotImplementedError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment