Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- ## Expected usage:
- -
- name: "{{ website.fancy_name }} - nginx container"
- docker_container:
- ...
- labels:
- "traefik.enable": "true",
- "traefik.http.routers.{{ website.name }}.rule": "Host({{ nginx_traefik_host }})"
- ### Actual usage:
- -
- name: "{{ website.fancy_name }} - nginx container"
- vars:
- # This hack is needed to allow using a variable in the Dictionary key.
- # @see https://github.com/ansible/ansible/issues/17324#issuecomment-498686519
- container_labels: |
- {
- "traefik.enable": "true",
- "traefik.http.routers.{{ website.name }}.rule": "Host({{ nginx_traefik_host }})"
- }
- docker_container:
- ...
- labels: "{{ container_labels }}"
Add Comment
Please, Sign In to add comment