From 36b0e6701443868a691ce20c5e4b4f98f7f436f1 Mon Sep 17 00:00:00 2001 From: Maddog2050 Date: Tue, 7 Apr 2020 23:22:27 +0100 Subject: [PATCH] Fix the vagrant provider name if no value is defined or empty value provided to use the vagrant driver default value. --- molecule_vagrant/playbooks/create.yml | 2 +- molecule_vagrant/playbooks/destroy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/molecule_vagrant/playbooks/create.yml b/molecule_vagrant/playbooks/create.yml index bf7b7a0..fb15fad 100644 --- a/molecule_vagrant/playbooks/create.yml +++ b/molecule_vagrant/playbooks/create.yml @@ -17,7 +17,7 @@ platform_box_version: "{{ item.box_version | default(omit) }}" platform_box_url: "{{ item.box_url | default(omit) }}" - provider_name: "{{ molecule_yml.driver.provider.name }}" + provider_name: "{{ molecule_yml.driver.provider.name | default(omit, true) }}" provider_memory: "{{ item.memory | default(omit) }}" provider_cpus: "{{ item.cpus | default(omit) }}" provider_options: "{{ item.provider_options | default(omit) }}" diff --git a/molecule_vagrant/playbooks/destroy.yml b/molecule_vagrant/playbooks/destroy.yml index 3b7ffb2..0a5f6dc 100644 --- a/molecule_vagrant/playbooks/destroy.yml +++ b/molecule_vagrant/playbooks/destroy.yml @@ -9,7 +9,7 @@ vagrant: instance_name: "{{ item.name }}" platform_box: "{{ item.box | default(omit) }}" - provider_name: "{{ molecule_yml.driver.provider.name }}" + provider_name: "{{ molecule_yml.driver.provider.name | default(omit, true) }}" provider_options: "{{ item.provider_options | default(omit) }}" provider_raw_config_args: "{{ item.provider_raw_config_args | default(omit) }}" force_stop: "{{ item.force_stop | default(true) }}"