Skip to content

Instantly share code, notes, and snippets.

@martineg
Last active August 29, 2015 13:58
Show Gist options
  • Save martineg/10327121 to your computer and use it in GitHub Desktop.
Save martineg/10327121 to your computer and use it in GitHub Desktop.
Check for listening on :443 on all RHEL 6.5 hosts
---
- hosts: all
tasks:
- name: Check if we listen on 443 on RHEL 6.5
command: nc -z {{ ansible_default_ipv4.address }} 443
when: ansible_distribution_version == '6.5'
register: rc
ignore_errors: true
changed_when: rc|success
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment