Skip to content

Commit 8f05bd1

Browse files
lucafavatellaangstwad
authored andcommitted
Fix error when specifying daemon_json
Symptom: ``` TASK [angstwad.docker_ubuntu : Creates override directory (systemd) owner=root, path=/etc/systemd/system/docker.service.d, state={{ daemon_json is not none or docker_http_proxy_defined or docker_https_proxy_defined | ternary('directory', 'absent') }}, group=root, mode=493] *** fatal: [dockerhost]: FAILED! => {"changed": false, "failed": true, "msg": "value of state must be one of: file,directory,link,hard,touch,absent, got: True"} ``` See also sample usage of `ternary` at http://docs.ansible.com/ansible/latest/playbooks_filters.html#id7
1 parent 92062e2 commit 8f05bd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
- name: Creates override directory (systemd)
141141
file:
142142
path: /etc/systemd/system/docker.service.d
143-
state: "{{ daemon_json is not none or docker_http_proxy_defined or docker_https_proxy_defined | ternary('directory', 'absent') }}"
143+
state: "{{ (daemon_json is not none or docker_http_proxy_defined or docker_https_proxy_defined) | ternary('directory', 'absent') }}"
144144
owner: root
145145
group: root
146146
mode: 0755

0 commit comments

Comments
 (0)