Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwrite provisioning playbook.yml in Vagrantfile #140

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joshavant
Copy link

This fixes a problem where, if vagrant provision is run more than once, the inline script from the Vagrantfile would append the existing contents the playbook.yml with another copy of the same script. After multiple copies have been redirected to playbook.yml, a YAML syntax error results. i.e. The following output will come from a second vagrant provision run:

==> default: ERROR! Syntax Error while loading YAML.
==> default: 
==> default: 
==> default: The error appears to have been in '/home/vagrant/ansible/roles-ubuntu/playbook.yml': line 6, column 1, but may
==> default: be elsewhere in the file depending on the exact syntax problem.
==> default: 
==> default: The offending line appears to be:
==> default: 
==> default:     - cis
==> default: ---
==> default: ^ here
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

This PR changes the inline script so that playbook.yml will be overwritten each time vagrant provision is called.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 87.261% when pulling bd22b65 on joshavant:vagrantfile-provisioning-fix into c346162 on awailly:master.

@pchaigno pchaigno requested a review from awailly September 18, 2017 11:06
@pchaigno pchaigno self-assigned this Sep 18, 2017
@pchaigno
Copy link
Collaborator

@joshavant Thanks for the pull request. While you're at it, could you also change it in the README?

@awailly Was there a reason for appending the new content rather than creating a new file? (This is from the general installation steps we have since the beginning.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants