Add traefik 2.1
This commit is contained in:
parent
28b8910ad4
commit
a804841f87
27 changed files with 709 additions and 11 deletions
47
tasks/version_2.1.yml
Normal file
47
tasks/version_2.1.yml
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
---
|
||||
- set_fact:
|
||||
traefik_2_1_state: "present"
|
||||
when:
|
||||
- traefik_version | regex_search('(^2.1)')
|
||||
|
||||
- set_fact:
|
||||
traefik_2_1_state: "absent"
|
||||
when:
|
||||
- not traefik_version | regex_search('(^2.1)')
|
||||
|
||||
- name: traefik files version 2.1 need to be {{ traefik_2_1_state }}
|
||||
k8s:
|
||||
state: "{{ traefik_2_1_state }}"
|
||||
context: "{{ my_context }}"
|
||||
resource_definition: "{{ lookup('template', item) | from_yaml }}"
|
||||
with_items:
|
||||
- 2.1/traefik-cm.yml.j2
|
||||
- 2.1/traefik-sa.yml.j2
|
||||
- 2.1/traefik-clusterrole.yml.j2
|
||||
- 2.1/traefik-clusterrolebinding.yml.j2
|
||||
- 2.1/traefik-crd-ingressroute.yml.j2
|
||||
- 2.1/traefik-crd-ingressroutetcp.yml.j2
|
||||
- 2.1/traefik-crd-middleware.yml.j2
|
||||
- 2.1/traefik-crd-tlsoption.yml.j2
|
||||
- 2.1/traefik-crd-traefikservice.yml.j2
|
||||
- 2.1/traefik-dp.yml.j2
|
||||
- 2.1/traefik-svc.yml.j2
|
||||
- 2.1/traefik-dashboard-svc.yml.j2
|
||||
- 2.1/traefik-middleware-httpsredirect.yml.j2
|
||||
- 2.1/traefik-middleware-basicauth.yml.j2
|
||||
- 2.1/traefik-tls-options.yml.j2
|
||||
- 2.1/traefik-dashboard.yml.j2
|
||||
- 2.1/traefik-dashboard-insecure.yml.j2
|
||||
- 2.1/traefik-ping.yml.j2
|
||||
tags: traefik
|
||||
|
||||
- name: IP white list need to be {{ traefik_2_1_state }} for traefik version 2.1
|
||||
k8s:
|
||||
state: "{{ traefik_2_1_state }}"
|
||||
context: "{{ my_context }}"
|
||||
resource_definition: "{{ lookup('template', item) | from_yaml }}"
|
||||
with_items:
|
||||
- 2.1/traefik-middleware-ipwhitelist.yml.j2
|
||||
when:
|
||||
- ingress_whitelist is defined or traefik_2_1_state == "absent"
|
||||
tags: traefik
|
||||
Loading…
Add table
Add a link
Reference in a new issue