Skip to content

Instantly share code, notes, and snippets.

@lmayorga1980
Last active June 20, 2024 20:30
Show Gist options
  • Save lmayorga1980/46498dc3d34398905fd1f9b230272d90 to your computer and use it in GitHub Desktop.
Save lmayorga1980/46498dc3d34398905fd1f9b230272d90 to your computer and use it in GitHub Desktop.
Running Ansible Against Windows to Retrieve Facts
##Windows over Winrm
ansible all -m setup -i <IP-ADDRESS>, -u Administrator -e ansible_connection=winrm -e ansible_password="<PASSWORD-HERE>" -e ansible_winrm_server_cert_validation=ignore -e ansible_port=5986
##Linux AWS SSH
ansible all -m setup -i <IP-ADDRESS>, -u ec2-user --private-key <PRIVATE-KEY> -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment