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

The ansible provisioner 'raw_arguments' option does not support white spaces #7890

Closed
gildegoma opened this issue Oct 11, 2016 · 2 comments
Closed

Comments

@gildegoma
Copy link
Collaborator

gildegoma commented Oct 11, 2016

Vagrant version

From version 1.3.0 to 1.8.6

Vagrantfile snippet

config.vm.provision "demotest1", type: "ansible" do |ansible|                                                                                      
    ansible.playbook = "demo.yml"                                                                                                           
    ansible.raw_arguments = ["-e '@my_variables.json'", "-u my_user", "-t my_tag"]                                                                                                    
end

Observed behaviour

The given raw_arguments are not effective.

Expected behavior

The Ansible provisioner should pass the raw_arguments value in the format supported by https://github.com/enkessler/childprocess library used under the hood to execute the ansible-playbook command from the host.

or

The documentation should be fixed, to better explain which formats are expected for the values in the raw_arguments array.

Steps to reproduce

  1. Use blank characters as separator in raw_arguments values. For instance: ['-t frontend,backend']
  2. run the ansible provisioner (e.g. vagant provision)

Workaround

Define raw_arguments values without any space, or split the argument and its value.

Examples:

  • ['--tags=frontend,backend']
  • ['-t', 'frontend,backend']
  • ['--tfrontend,backend']

References

Notes

This problem only affects the ansible provisioner. The ansible_local provisioner is not affected since the generated ansible-playbook command is formatted as a string, and remotely executed over SSH.

@gildegoma
Copy link
Collaborator Author

Resolving as a documentation bug, see 35f7c2c. I don't think it is worth the effort to try to add support for whitespace characters in this case.

@gildegoma gildegoma added this to the 1.8.7 milestone Oct 21, 2016
@ghost
Copy link

ghost commented Apr 3, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@hashicorp hashicorp locked and limited conversation to collaborators Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant