We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello! Thanks for role docker I try configure tag in log-opts for get result like this:
{ "log-driver": "json-file", "log-opts": { "tag": "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}" } }
Playbook
--- - hosts: javaindocker become: true pre_tasks: - name: Update apt cache. apt: update_cache=true cache_valid_time=600 when: ansible_os_family == 'Debian' - name: install pip3 apt: name=python3-pip state=present - name: Install multi python packages with version specifiers pip: name: - docker - docker-compose roles: - role: ansible-role-docker
Inventory
all: children: javaindocker: hosts: "javaindocker": ansible_host: "xxx" vars: docker_options: "log-driver": "json-file" "log-opts": "tag": "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}" "max-size": "100m"
error:
TASK [ansible-role-docker : Docker | Deploy Config | Set the Docker configuration] ***************************************************************************************************** Sunday 01 May 2022 14:16:17 +0600 (0:00:00.954) 0:02:37.514 ************ fatal: [javaindocker]: FAILED! => msg: 'An unhandled exception occurred while templating ''{''log-driver'': ''json-file'', ''log-opts'': {''tag'': ''{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}'', ''max-size'': ''100m''}}''. Error was a <class ''ansible.errors.AnsibleError''>, original message: template error while templating string: unexpected ''.''. String: {{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello! Thanks for role docker
I try configure tag in log-opts for get result like this:
{
"log-driver": "json-file",
"log-opts": {
"tag": "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}"
}
}
Playbook
Inventory
error:
The text was updated successfully, but these errors were encountered: