Create fluentd tag in dynamic way

15 views
Skip to first unread message

Viktor Kucher

unread,
Nov 10, 2016, 1:39:00 PM11/10/16
to Ansible Project
Hi everyone,

I would like run docker container with log-driver as fluentd. I can't create fluentd tag in dynamic way, like below

- name: "run container"
  docker:
    name: api
    image: api
    state: started
    restart_policy: always
    tty: yes
    publish_all_ports: yes
    log_driver: fluentd
    log_opt:
      tag: "{{ '{{' }}index .ContainerLabels.some_var {{ '}}' }}"
      fluentd-async-connect: "true"
      fluentd-address: 10.10.10.10:224
    net: bridge
  register: container_api

Could you advice, please ?

Thanks

Reply all
Reply to author
Forward
0 new messages