# ansible command or shell: vagrant add box ubuntu/trusty64

**URL:** <https://forum.ansible.com/t/ansible-command-or-shell-vagrant-add-box-ubuntu-trusty64/18896>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [July 30, 2015, 1:16am UTC](https://forum.ansible.com/t/ansible-command-or-shell-vagrant-add-box-ubuntu-trusty64/18896 "2015-07-30T01:16:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phill\_Pafford](https://avatars.discourse-cdn.com/v4/letter/p/e5b9ba/32.png) [@Phill\_Pafford](https://forum.ansible.com/u/Phill_Pafford)\
**Post date:** [July 30, 2015, 1:16am UTC](https://forum.ansible.com/t/ansible-command-or-shell-vagrant-add-box-ubuntu-trusty64/18896/1 "2015-07-30T01:16:22Z")

</div>

I can run this command from the command line and it runs fine, using Ansible command or shell I get an error

```auto
- name: download vagrant box ubuntu/trusty64
  command: vagrant box add ubuntu/trusty64

```

anyone else have this issue?

---

<div class="post-metadata">

**Author:** ![Paul\_Markham](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@Paul\_Markham](https://forum.ansible.com/u/Paul_Markham)\
**Post date:** [July 30, 2015, 2:49am UTC](https://forum.ansible.com/t/ansible-command-or-shell-vagrant-add-box-ubuntu-trusty64/18896/2 "2015-07-30T02:49:42Z")

</div>

What error are you getting?

---

<div class="post-metadata">

**Author:** ![Mischa\_ter\_Smitten](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@Mischa\_ter\_Smitten](https://forum.ansible.com/u/Mischa_ter_Smitten)\
**Post date:** [July 30, 2015, 7:06am UTC](https://forum.ansible.com/t/ansible-command-or-shell-vagrant-add-box-ubuntu-trusty64/18896/3 "2015-07-30T07:06:53Z")

</div>

Try to quote the command

---

<div class="post-metadata">

**Author:** ![Phill\_Pafford](https://avatars.discourse-cdn.com/v4/letter/p/e5b9ba/32.png) [@Phill\_Pafford](https://forum.ansible.com/u/Phill_Pafford)\
**Post date:** [July 31, 2015, 1:22pm UTC](https://forum.ansible.com/t/ansible-command-or-shell-vagrant-add-box-ubuntu-trusty64/18896/4 "2015-07-31T13:22:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Phill\_Pafford](https://avatars.discourse-cdn.com/v4/letter/p/e5b9ba/32.png) [@Phill\_Pafford](https://forum.ansible.com/u/Phill_Pafford)\
**Post date:** [July 31, 2015, 1:22pm UTC](https://forum.ansible.com/t/ansible-command-or-shell-vagrant-add-box-ubuntu-trusty64/18896/5 "2015-07-31T13:22:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Paul\_Markham](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@Paul\_Markham](https://forum.ansible.com/u/Paul_Markham)\
**Post date:** [August 1, 2015, 12:32am UTC](https://forum.ansible.com/t/ansible-command-or-shell-vagrant-add-box-ubuntu-trusty64/18896/6 "2015-08-01T00:32:57Z")

</div>

I can’t reproduce this error. When I created a playbook with your task in it, it works:

`

- hosts: localhost  
gather\_facts: no  
connection: local  
tasks:
- name: download vagrant box ubuntu/trusty64  
command: vagrant box add ubuntu/trusty64  
`

`

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.

---

<div class="post-metadata">

**Author:** ![Bob\_Tanner](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Bob\_Tanner](https://forum.ansible.com/u/Bob_Tanner)\
**Post date:** [August 2, 2015, 10:04pm UTC](https://forum.ansible.com/t/ansible-command-or-shell-vagrant-add-box-ubuntu-trusty64/18896/7 "2015-08-02T22:04:19Z")

</div>

What version of ansible?

---

<div class="post-metadata">

**Author:** ![Phill\_Pafford](https://avatars.discourse-cdn.com/v4/letter/p/e5b9ba/32.png) [@Phill\_Pafford](https://forum.ansible.com/u/Phill_Pafford)\
**Post date:** [August 3, 2015, 1:30pm UTC](https://forum.ansible.com/t/ansible-command-or-shell-vagrant-add-box-ubuntu-trusty64/18896/8 "2015-08-03T13:30:48Z")

</div>

ansible --version  
ansible 1.9.0.1  
configured module search path = None

---

<div class="post-metadata">

**Author:** ![Phill\_Pafford](https://avatars.discourse-cdn.com/v4/letter/p/e5b9ba/32.png) [@Phill\_Pafford](https://forum.ansible.com/u/Phill_Pafford)\
**Post date:** [August 5, 2015, 2:17am UTC](https://forum.ansible.com/t/ansible-command-or-shell-vagrant-add-box-ubuntu-trusty64/18896/9 "2015-08-05T02:17:07Z")

</div>

I upgraded to the latest, same issue. I think it might be vagrant but still having issues
