Forge Home


TCP simple port tests


212,429 latest version

4.0 quality score

Version information

  • 0.1.2 (latest)
  • 0.1.1
  • 0.1.0
  • 0.0.4
  • 0.0.3 (deleted)
  • 0.0.2 (deleted)
  • 0.0.1 (deleted)
released Jun 10th 2020
This version is compatible with:
  • Puppet Enterprise >= 3.0.0
  • Puppet 4.x
  • , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'redlegoman-porttest', '0.1.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add redlegoman-porttest
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install redlegoman-porttest --version 0.1.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Tags: test, tcp, port, porttest


redlegoman/porttest — version 0.1.2 Jun 10th 2020


Table of Contents

  1. Overview
  2. Setup - The basics of getting started with porttest
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.


TCP port testing for Puppet.

very definitely based upon

Also found at


What porttest affects

  • A small python script is installed in a user configurable location. This runs the TCP testing. On success a file is touched so the host:port is only tested once instead of being tested on every puppet agent run.

Setup Requirements

Python is needed and assumed installed. Even old RedHat 5 systems have the needed Python modules installed.

Beginning with porttest


porttest::tcp { 'test tcp 80 to': 
  target => [ '' ], 
  timeout   => '2', 



####Public defines

  • porttest::tcp: Test TCP ports on hosts

####Private classes

  • porttest::install: Installs the port test Python script



Specify the IP, hostname, or FQDN of the target to test and the port in the format 'host:port'


Specify the number of seconds before I give up and return a fail


Python is the only requirement and comes installed with all modern Linux flavors.