---
- name: Install Docker plugin
  command: docker plugin install --grant-all-permissions {{ docker_plugin | quote }}
  when: docker_plugin is defined
  register: docker_plugin_status
  failed_when:
    - docker_plugin_status.failed
    - '"already exists" not in docker_plugin_status.stderr'
