volanja / ansible_spec

It's ruby gem that connect Ansible & Serverspec for Test Driven Server Configuration(or TDD).
MIT License
229 stars 57 forks source link

Ensure superfluous quotes are removed from host vars #112

Closed sagiru closed 6 years ago

sagiru commented 6 years ago

It's possible to use quoted host vars inside the inventory script e.g. ansible_user='vagrant'. For ansible it's a valid syntax but then ansible_spec will use "'vagrant'" as user. So the ssh connection will fail.

sagiru commented 6 years ago

Did a small update because single AND double quotes has to be removed

volanja commented 6 years ago

It's not ansible_spec problem.

According to Ansible Docs, you should not add single quotes to value of ansible_user. Although it can be used at the present time, it may not be able to use it in the future.

I think that this problem cause by vagrant ansible provisioner. vagrant ansible provisioner generate inventory automatically. but this provisioner add single quotes to value of ansible_user to auto-generated inventory. https://www.vagrantup.com/docs/provisioning/ansible_intro.html

relate issue : https://github.com/volanja/ansible_spec/issues/110