Fix a bug and add TLS configuration support
This commit is contained in:
parent
206f44c362
commit
7dff2ffc7b
7 changed files with 96 additions and 5 deletions
|
|
@ -2,12 +2,12 @@
|
|||
- set_fact:
|
||||
traefik_2_0_state: "present"
|
||||
when:
|
||||
- traefik_version == "2.0"
|
||||
- traefik_version | regex_search('(2.)')
|
||||
|
||||
- set_fact:
|
||||
traefik_2_0_state: "absent"
|
||||
when:
|
||||
- traefik_version != "2.0"
|
||||
- not traefik_version | regex_search('(2.0)')
|
||||
|
||||
- name: traefik files version {{ traefik_version }} need to be {{ traefik_2_0_state }}
|
||||
k8s:
|
||||
|
|
@ -23,11 +23,24 @@
|
|||
- 2.0/traefik-crd-ingressroutetcp.yml.j2
|
||||
- 2.0/traefik-crd-middleware.yml.j2
|
||||
- 2.0/traefik-crd-tlsoption.yml.j2
|
||||
- 2.0/traefik-middleware-httpsredirect.yml.j2
|
||||
- 2.0/traefik-middleware-basicauth.yml.j2
|
||||
- 2.0/traefik-dp.yml.j2
|
||||
- 2.0/traefik-svc.yml.j2
|
||||
- 2.0/traefik-dashboard-svc.yml.j2
|
||||
- 2.0/traefik-middleware-httpsredirect.yml.j2
|
||||
- 2.0/traefik-middleware-basicauth.yml.j2
|
||||
- 2.0/traefik-tls-options.yml.j2
|
||||
- 2.0/traefik-dashboard.yml.j2
|
||||
- 2.0/traefik-dashboard-insecure.yml.j2
|
||||
- 2.0/traefik-ping.yml.j2
|
||||
tags: traefik
|
||||
|
||||
- name: IP white list need to be {{ traefik_2_0_state }} for traefik version {{ traefik_version }}
|
||||
k8s:
|
||||
state: "{{ traefik_2_0_state }}"
|
||||
context: "{{ my_context }}"
|
||||
resource_definition: "{{ lookup('template', item) | from_yaml }}"
|
||||
with_items:
|
||||
- 2.0/traefik-middleware-ipwhitelist.yml.j2
|
||||
when:
|
||||
- ingress_whitelist is defined or traefik_2_0_state == "absent"
|
||||
tags: traefik
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue