votum.ngrok

Ansible Role for Ngrok

This role helps you download and install the ngrok program and set up a custom tunnel configuration.

Requirements

None

Role Variables

Name Default Description
ngrok_download https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip URL for downloading ngrok
ngrok_path_download_tmp /tmp Temporary download location
ngrok_path_install /opt/ngrok Where ngrok will be installed
ngrok_path_bin /usr/bin/ngrok Path to the ngrok binary
ngrok_path_init /etc/init.d Path for the init script
ngrok_path_systemd /lib/systemd/system Path for systemd service files
ngrok_auth_token required; must be set in the playbook variables
ngrok_console_ui false Enable console UI or not
ngrok_region eu Region for ngrok
ngrok_tunnels [] List of tunnels to configure
ngrok_user Optional; defaults to ansible_ssh_user if not set
ngrok_start_tunnel --all Specify which tunnels to run in service (optional)
ngrok_install_as_service false If true, creates an init script for ngrok
ngrok_service_name ngrok Name of the ngrok service
ngrok_daemon {{ ngrok_path_bin }} Path to the ngrok daemon
ngrok_daemon_opts start {{ ngrok_start_tunnel }} --config /home/{{ ngrok_user }}/.ngrok2/ngrok.yml Options for starting the ngrok daemon
ngrok_pidfile /var/run/ngrok.pid Location of the PID file for ngrok

Example Tunnel Configuration:

ngrok_tunnels:
  - name: "custom-name-for-tunnel"
    hostname: "my-custom-host.ngrok.io"     # optional
    subdomain: "my-custom-subdomain"         # optional subdomain for ngrok.io
    address: "my.local.address:80"           # local address for tunneling
    proto: "http"                            # optional; default is http
    bind_tls: "both"                         # optional; default is both
    auth:
      username: "ngrokuser"                  # authentication username
      password: "secretpassword"              # authentication password

Dependencies

None

Example Playbook

Here’s an example of how to use this role:

- hosts: servers
  roles:
     - { role: "votum.ngrok" }

License

This project is licensed under the MIT License. See the LICENSE file for the complete license text.

Author Information

Bernd Alter / VOTUM GmbH

Informazioni sul progetto

Role for ngrok installation and tunnel configuration

Installa
ansible-galaxy install votum.ngrok
Licenza
mit
Download
7.2k
Proprietario