haxorof/ansible-role-docker-ce

Docker plugin install seems to be missing "item.args"

janorn opened this issue · 1 comments

In this code there is no reference to the args parameter in the dict. End result if you try to use the Opa example is that it will not find the policy file.

- name: Install Docker plugins
become: yes
shell: "(docker plugin install --grant-all-permissions --alias {{ item.alias | default(item.name) }} {{ item.name }} \
&& echo 'installed') || echo 'nop'"
loop: "{{ docker_plugins }}"

Perhaps this was the intended code?

"(docker plugin install --grant-all-permissions --alias {{ item.alias | default(item.name) }} {{ item.name }} {{ item.args }} \ 
     && echo 'installed') || echo 'nop'"

Thanks @janorn for reporting this! I actually think I must have missed the args and is an optional thing to have. In the opa case they do not require that args to be set. Will correct this.