escaping docker-compose template variables with ansible

Viewed 397

I want to pass aws logs drive configurations using ansible scripts.

Following is the aws log configuration snippet.

logging:
      driver: awslogs
      options:
        awslogs-region: us-east-2
        awslogs-group: dev
        awslogs-stream: stream-{{.FullID}}

{{.FullID}} is a tag supported by docker-compose ansible throws the following error while trying to execute it.

{"changed": false, "failed": true, "msg": "AnsibleError: template error while templating string: unexpected '.'. String: version: '2

Is there a way to achieve this configuration with ansible?

2 Answers
Related