mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Fix docker_plugin crash when handling plugin options (#447)
* Fix docker_plugin crash when handling plugin options. * Try to add tests.
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
- name: Create random name prefix
|
||||
set_fact:
|
||||
name_prefix: "cvmfs/overlay2-graphdriver"
|
||||
name_prefix: "vieux/sshfs"
|
||||
plugin_names: []
|
||||
|
||||
- debug:
|
||||
@@ -62,6 +62,12 @@
|
||||
state: absent
|
||||
register: absent_4
|
||||
|
||||
- name: Cleanup
|
||||
docker_plugin:
|
||||
plugin_name: "{{ plugin_name }}"
|
||||
state: absent
|
||||
force_remove: true
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- create_1 is changed
|
||||
@@ -75,10 +81,48 @@
|
||||
|
||||
############ Plugin_Options ############
|
||||
########################################
|
||||
# Integration-Test with plugin_options is in TODO-List
|
||||
|
||||
- name: Install a plugin with options
|
||||
docker_plugin:
|
||||
plugin_name: "{{ plugin_name }}"
|
||||
plugin_options:
|
||||
DEBUG: '1'
|
||||
state: present
|
||||
register: create_1
|
||||
|
||||
- name: Install a plugin with options (idempotent)
|
||||
docker_plugin:
|
||||
plugin_name: "{{ plugin_name }}"
|
||||
plugin_options:
|
||||
DEBUG: '1'
|
||||
state: present
|
||||
register: create_2
|
||||
|
||||
- name: Install a plugin with different options
|
||||
docker_plugin:
|
||||
plugin_name: "{{ plugin_name }}"
|
||||
plugin_options:
|
||||
DEBUG: '0'
|
||||
state: present
|
||||
register: update_1
|
||||
|
||||
- name: Install a plugin with different options (idempotent)
|
||||
docker_plugin:
|
||||
plugin_name: "{{ plugin_name }}"
|
||||
plugin_options:
|
||||
DEBUG: '0'
|
||||
state: present
|
||||
register: update_2
|
||||
|
||||
- name: Cleanup
|
||||
docker_plugin:
|
||||
plugin_name: "{{ plugin_name }}"
|
||||
state: absent
|
||||
force_remove: true
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- create_1 is changed
|
||||
- create_2 is not changed
|
||||
- update_1 is changed
|
||||
- update_2 is not changed
|
||||
|
||||
Reference in New Issue
Block a user