Ansible role to deploy traefik binary and systemd unit.
Træfɪk is a modern HTTP reverse proxy and load balancer made to deploy microservices with ease. It supports several backends (Docker, Swarm, Kubernetes, Marathon, Mesos, Consul, Etcd, Zookeeper, BoltDB, Rest API, file…) to manage its configuration automatically and dynamically.
$ ansible-galaxy install kibatic.traefik
traefik_install_dir: /usr/bin
traefik_binary_url: https://github.com/containous/traefik/releases/download/v1.1.2/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
Create a custom config file templates/traefik.toml.j2
.
Override template variable (e.g. in group_vars/all.yml
)
traefik_template: templates/traefic.toml
Add role to your playbook.
- hosts: servers
roles:
- { role: kibatic.traefik, tags: traefik }
MIT