hashbangcode / vlad

Vlad - Vagrant LAMP Ansible Drupal
173 stars 53 forks source link

Box fails to provision: template error while templating string #365

Open MrDaleSmith opened 8 years ago

MrDaleSmith commented 8 years ago

With the latest release of VLAD, I'm getting the error -

TASK: [get current Vlad version] ****** fatal: [192.168.100.100] => Failed to template {% if [my base path]/vlad/vlad_guts %} True {% else %} False {% endif %}: template error while templating string: unexpected '/'

If I remove the changes in c7f9c911e606dc134ccce6ef9254f8596a4d74cf, specifically -

- name: set local inventory dir variable
  set_fact:
    inventory_dir: "/vagrant/"
  when: inventory_dir == false and vlad_running_local == false

and

  when: inventory_dir

from the site.yml, then I can get the box up.

MrDaleSmith commented 8 years ago

Seems to be the when: inventory_dir that's causing the problem: removing it also allows the box to go up.

philipnorton42 commented 8 years ago

Very strange. I always do a full provision before releasing a new version just in case and this error wasn't there. Just did a test provision now to test and it all worked. What version of Ansible are you using? Maybe it's a version thing?

MrDaleSmith commented 8 years ago

ansible 1.9.2

philipnorton42 commented 8 years ago

That might be it. I'm running Ansible 2.0.0.1. Are you able to update your rig? In the meantime it might be worth adding more version requirements to Vlad to stop this sort of thing.

MrDaleSmith commented 8 years ago

Sounds likely: I can't upgrade my ansible because I'm hitting an error with OPENSSL that I can't seem to find a workaround for: I made the stupid mistake up upgrading OSX last month and have regretted it ever since. But I'd guess the version is the cause.

philipnorton42 commented 8 years ago

I'm sure I had the same problem when I upgraded. Can't remember how I got around it now... :( Let me know how you get on though!

MrDaleSmith commented 8 years ago

It was the cryptography dependency that was failing: fixed it with the approach in http://masnun.com/2015/12/01/fixing-fatal-error-opensslaes-h-file-not-found-on-os-x.html

No issues provisioning in Ansible 2.1.0, so yeah looks like it needs an update the the minimum Ansible version requirement.

philipnorton42 commented 8 years ago

Cool. Thanks for clarifying :)