levonet.ci_get_free_port
CI: Get Free TCP Port
This tool helps you find an available TCP port on a remote machine.
Role Variables
ci_get_free_port__var
(default: ci_get_free_port): This variable holds the name where the found free port will be stored.ci_get_free_port__pool
(default: 1024-32767): The range of port numbers to check for a free port.ci_get_free_port__host
(default: 127.0.0.1): The IP address of the machine where it will look for a free port.ci_get_free_port__default
(default: ""): A value that will be used if no free port is found in the specified range.
Requirements
The nmap
(nc
) tool must be installed on the remote machine.
Example Playbook
- hosts: all
become: yes
become_method: sudo
vars:
ci_get_free_port__var: project_port
roles:
- role: levonet.ci_get_free_port
tasks:
- debug:
msg: "Port: {{ project_port }}"
License
Author Information
This tool was created by Pavlo Bashynskyi
Installa
ansible-galaxy install levonet.ci_get_free_port
Licenza
mit
Download
7.4k
Proprietario