Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Commit 63253ac

Browse files
Make cachier optional (#101)
* Make tests run pip seems to be required for development style installs Ansible chokes on the yaml stdout_callback * Make cachier optional Fixes #100 * Document the option Co-authored-by: Sorin Sbarnea <[email protected]>
1 parent 8a2b001 commit 63253ac

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.rst

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ Here's a full example with the libvirt provider:
9595
ssh.keep_alive: yes
9696
ssh.remote_user: 'vagrant'
9797
synced_folder: true
98+
cachier: false # disable cachier plugin, if it's detected
9899
box: fedora/32-cloud-base
99100
box_version: 32.20200422.0
100101
box_url:

molecule_vagrant/modules/vagrant.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,11 @@
175175
176176
Vagrant.configure('2') do |config|
177177
if Vagrant.has_plugin?('vagrant-cachier')
178+
{% if instance.config_options['cachier'] is sameas false %}
179+
config.cache.disable!
180+
{% else %}
178181
config.cache.scope = 'machine'
182+
{% endif %}
179183
end
180184
181185
config.vm.define "{{ instance.name }}" do |c|
@@ -194,7 +198,7 @@
194198
{% endif %}
195199
196200
{% for k,v in instance.config_options.items() %}
197-
{% if k != 'synced_folder' %}c.{{ k }} = {{ ruby_format(v) }}{% endif %}
201+
{% if k not in ['synced_folder', 'cachier'] %}c.{{ k }} = {{ ruby_format(v) }}{% endif %}
198202
{% endfor %}
199203
200204
c.vm.hostname = "{{ instance.name }}"
@@ -469,6 +473,7 @@ def _get_vagrant_config_dict(self):
469473
# simply enable/disable shared folder.
470474
"synced_folder": False,
471475
"ssh.insert_key": True,
476+
"cachier": True,
472477
},
473478
"box": self._module.params["platform_box"],
474479
"box_version": self._module.params["platform_box_version"],

0 commit comments

Comments
 (0)