Skip to content

Commit 7eab71d

Browse files
authored
Add safe filter for raw args (vagrant) (#141)
src/molecule_plugins/vagrant/modules/vagrant.py: Add safe filter for raw args Since molecule ansible/molecule#3887, the jinja is now autoescaping, which leads to things like: virtualbox.customize [&#39;modifyvm&#39;, :id, &#39;--natdnshostresolver1&#39;, &#39;on&#39;] in the Vagrantfile. Add some "safe" filters to solve this. Signed-off-by: Arnaud Patard <[email protected]>
1 parent 7498e81 commit 7eab71d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/molecule_plugins/vagrant/modules/vagrant.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@
249249
# instance_raw_config_args
250250
##
251251
{% if instance.instance_raw_config_args is not none %}{% for arg in instance.instance_raw_config_args -%}
252-
c.{{ arg }}
252+
c.{{ arg | safe }}
253253
{% endfor %}{% endif %}
254254
255255
##
@@ -273,13 +273,13 @@
273273
274274
{% if instance.provider_raw_config_args is not none %}
275275
{% for arg in instance.provider_raw_config_args %}
276-
{{ instance.provider | lower }}.{{ arg }}
276+
{{ instance.provider | lower }}.{{ arg | safe }}
277277
{% endfor %}
278278
{% endif %}
279279
280280
{% if instance.provider_override_args is not none %}
281281
{% for arg in instance.provider_override_args -%}
282-
override.{{ arg }}
282+
override.{{ arg | safe }}
283283
{% endfor %}
284284
{% endif %}
285285

0 commit comments

Comments
 (0)