kibatic.traefik

❗❗❗ 该角色不再维护 ❗❗❗

[归档] kibatic.traefik

❗❗❗ 该角色不再维护 ❗❗❗

Ansible 角色用于部署 traefik 可执行文件和 systemd 单元。

构建状态

Træfɪk 是一个现代的 HTTP 反向代理和负载均衡器,旨在轻松部署微服务。它支持多种后端(Docker、Swarm、Kubernetes、Marathon、Mesos、Consul、Etcd、Zookeeper、BoltDB、Rest API、文件等),以自动和动态地管理其配置。

安装

$ ansible-galaxy install kibatic.traefik

角色变量

traefik_install_dir: /usr/bin
traefik_binary_url: https://github.com/containous/traefik/releases/download/v1.7.5/traefik_linux-amd64
traefik_bin_path: "{{ traefik_install_dir }}/traefik"
traefik_config_file: /etc/traefik.toml
traefik_template: traefik.toml
traefik_systemd_unit_template: traefik.service
traefik_systemd_unit_dest: /etc/systemd/system/traefik.service

配置

创建一个自定义配置文件 templates/traefik.toml.j2。 覆盖模板变量(例如在 group_vars/all.yml 中)

traefik_template: templates/traefik.toml

将角色添加到您的剧本中。

    - hosts: servers
      roles:
         - { role: kibatic.traefik, tags: traefik }

更新 Traefik

您需要更改 traefik_binary_url 或更新此角色。然后运行您的剧本,使用以下 额外变量

$ ansible-playbook playbook.yml -t traefik --extra-vars "traefik_update=yes"

如果您想降级,也使用相同的命令。

许可证

MIT

关于项目

Ansible role to deploy traefik binary and systemd unit

安装
ansible-galaxy install kibatic.traefik
许可证
mit
下载
10.6k
拥有者
Ajoutez de l'intelligence à vos systèmes