hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.25k stars 4.43k forks source link

Fix a type of playbook_command and add description more on doc #13187

Open maruloop opened 1 year ago

maruloop commented 1 year ago

When ansible was installed into rye or pipenv, I needed to specify playbook_command like the below.

OK:

ansible.playbook_command = ["rye", "run", "ansible-playbook"]

When I specified it as a String type, Vagrant raised an exception.

NG:

ansible.playbook_command = "rye run ansible-playbook"
hashicorp-cla commented 1 year ago

CLA assistant check
All committers have signed the CLA.

chrisroberts commented 1 year ago

@maruLoop Do you have the exception information available that Vagrant generated?

maruloop commented 1 year ago

@chrisroberts

In the Vagrantfile,

  config.vm.provision "ansible" do |ansible|
    ansible.playbook = "myplaybook.yml"
    ansible.playbook_command = "rye run ansible-playbook"
  end

I got this error.

The Ansible software could not be found! Please verify
that Ansible is correctly installed on your host system.

If you haven't installed Ansible yet, please install Ansible
on your host system. Vagrant can't do this for you in a safe and
automated way.
Please check https://docs.ansible.com for more information.