I can run this command from the command line and it runs fine, using Ansible command or shell I get an error
- name: download vagrant box ubuntu/trusty64
command: vagrant box add ubuntu/trusty64
anyone else have this issue?
I can run this command from the command line and it runs fine, using Ansible command or shell I get an error
- name: download vagrant box ubuntu/trusty64
command: vagrant box add ubuntu/trusty64
anyone else have this issue?
What error are you getting?
Try to quote the command
failed: [nabsource-interview] => {“changed”: true, “cmd”: [“vagrant”, “box”, “add”, “ubuntu/trusty64”], “delta”: “0:00:01.278622”, “end”: “2015-07-31 09:25:02.659931”, “rc”: 1, “start”: “2015-07-31 09:25:01.381309”, “warnings”: }
stderr: This command was not invoked properly. The help for this command is
available below.
Usage: vagrant box add [–provider provider] [-h]
–checksum VALUE Checksum
–checksum-type VALUE Checksum type
-c, --clean Remove old temporary download if it exists.
-f, --force Overwrite an existing box if it exists.
–insecure If set, SSL certs will not be validated.
–cacert certfile CA certificate
–cert certfile The client SSL cert
–provider provider The provider that backs the box.
-h, --help Print this help
FATAL: all hosts have already failed – aborting
I have, same issue
failed: [nabsource-interview] => {“changed”: true, “cmd”: [“vagrant”, “box”, “add”, “ubuntu/trusty64”], “delta”: “0:00:01.278622”, “end”: “2015-07-31 09:25:02.659931”, “rc”: 1, “start”: “2015-07-31 09:25:01.381309”, “warnings”: }
stderr: This command was not invoked properly. The help for this command is
available below.
Usage: vagrant box add [–provider provider] [-h]
–checksum VALUE Checksum
–checksum-type VALUE Checksum type
-c, --clean Remove old temporary download if it exists.
-f, --force Overwrite an existing box if it exists.
–insecure If set, SSL certs will not be validated.
–cacert certfile CA certificate
–cert certfile The client SSL cert
–provider provider The provider that backs the box.
-h, --help Print this help
FATAL: all hosts have already failed – aborting
I can’t reproduce this error. When I created a playbook with your task in it, it works:
`
`
PLAY [localhost] **************************************************************
TASK: [download vagrant box ubuntu/trusty64] **********************************
changed: [localhost]
PLAY RECAP ********************************************************************
localhost : ok=1 changed=1 unreachable=0 failed=0
$ vagrant box list
ubuntu/trusty64 (virtualbox, 20150609.0.10)
`
I’m running:
Mac OS X
Vagrant 1.7.4
Ansible 1.9.2
Perhaps double check that your playbook doesn’t have any funny, unprintable, characters in it.
What version of ansible?
ansible --version
ansible 1.9.0.1
configured module search path = None
I upgraded to the latest, same issue. I think it might be vagrant but still having issues