Skip to content

Instantly share code, notes, and snippets.

@mmasko
Last active February 26, 2021 19:40
Show Gist options
  • Save mmasko/ec5bf846c24ce1dee283a11fcc8e3fbe to your computer and use it in GitHub Desktop.
Save mmasko/ec5bf846c24ce1dee283a11fcc8e3fbe to your computer and use it in GitHub Desktop.
port check on linux using raw shell
true &>/dev/null </dev/tcp/$HOSTNAMEorIP/$PORT && echo open || echo closed
ansible all -m win_ping -i $IP, --extra-vars "ansible_user=$username ansible_password=$password ansible_port=5986 ansible_connection=winrm ansible_winrm_server_cert_validation=ignore"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment