votum.ngrok

ansible角色用于ngrok

构建状态

此角色将下载并安装ngrok二进制文件,并添加自定义隧道配置。

要求

角色变量

名称 默认值 描述
ngrok_download https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
ngrok_path_download_tmp /tmp
ngrok_path_install /opt/ngrok
ngrok_path_bin /usr/bin/ngrok
ngrok_path_init /etc/init.d
ngrok_path_systemd /lib/systemd/system
ngrok_auth_token 必需,需要在剧本变量中设置
ngrok_console_ui false
ngrok_region eu
ngrok_tunnels []
ngrok_user 可选,默认值如果未设置: ansible_ssh_user
ngrok_start_tunnel --all 要在服务中运行的隧道(可选),默认为启动所有隧道
ngrok_install_as_service false 创建初始化脚本
ngrok_service_name ngrok
ngrok_daemon {{ ngrok_path_bin }}
ngrok_daemon_opts start {{ ngrok_start_tunnel }} --config /home/{{ ngrok_user }}/.ngrok2/ngrok.yml
ngrok_pidfile /var/run/ngrok.pid

隧道配置示例:

ngrok_tunnels:
  - name:       "自定义隧道名称"
    hostname:   "my-custom-host.ngrok.io"    # 可选
    subdomain:  "my-custom-subdomain"        # ngrok.io的子域名(可选),仅在未定义主机名时使用。
                                             # 如果子域名也未定义,ngrok将使用隧道名称作为子域名
    address:    "my.local.address:80"
    proto:      "http"                       # 可选,默认:http
    bind_tls:   both                         # 可选,默认:both (false:仅http, true:仅https, both: http & https)
    auth:
      username: "ngrokuser"
      password: "secretpassword"

依赖关系

示例剧本

提供一个如何使用此角色的示例(例如,传递变量作为参数)对用户总是很有帮助:

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

许可证

该项目遵循MIT许可证。请参阅许可证文件获取完整许可证文本。

作者信息

Bernd Alter / VOTUM GmbH

关于项目

Role for ngrok installation and tunnel configuration

安装
ansible-galaxy install votum.ngrok
许可证
mit
下载
7.2k
拥有者