Skip to content

Commit

Permalink
fixing incorrect missing ansible error
Browse files Browse the repository at this point in the history
At least for ansible 2.0.0.1 the command `ansible-galaxy --help` is inappropriate for testing if ansible is installed, as it yields an error:

```
vagrant@vagrant-ubuntu-trusty-64:~$ ansible-galaxy --help && echo "OK"          
Usage: ansible-galaxy [delete|import|info|init|install|list|login|remove|search|setup] [--help] [options] ...

Options:
  -h, --help     show this help message and exit
  -v, --verbose  verbose mode (-vvv for more, -vvvv to enable connection
                 debugging)
  --version      show program's version number and exit
ERROR! Missing required action
```
  • Loading branch information
daniel-sc committed Jan 13, 2016
1 parent 54aa2f6 commit 9dbdb93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/provisioners/ansible/provisioner/guest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def check_and_install_ansible

# Check that ansible binaries are well installed on the guest,
@machine.communicate.execute(
"ansible-galaxy --help && ansible-playbook --help",
"ansible-galaxy info --help && ansible-playbook --help",
:error_class => Ansible::Errors::AnsibleNotFoundOnGuest,
:error_key => :ansible_not_found_on_guest)

Expand Down

2 comments on commit 9dbdb93

@johnjelinek
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jamescarr
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 When will this be included in the next release?

Please sign in to comment.