ansible command or shell: vagrant add box ubuntu/trusty64

174 views
Skip to first unread message

Phill Pafford

unread,
Jul 29, 2015, 9:16:22 PM7/29/15
to Ansible Project
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?

Paul Markham

unread,
Jul 29, 2015, 10:49:42 PM7/29/15
to Ansible Project, phillp...@gmail.com
What error are you getting?

Mischa ter Smitten

unread,
Jul 30, 2015, 3:06:53 AM7/30/15
to Ansible Project
Try to quote the command

Phill Pafford

unread,
Jul 31, 2015, 9:22:09 AM7/31/15
to Ansible Project, phillp...@gmail.com, pa...@netrefinery.com
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 <name> <url> [--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


On Wednesday, July 29, 2015 at 10:49:42 PM UTC-4, Paul Markham wrote:
What error are you getting?

Phill Pafford

unread,
Jul 31, 2015, 9:22:33 AM7/31/15
to Ansible Project, mis...@tersmitten.nl
I have, same issue

On Thursday, July 30, 2015 at 3:06:53 AM UTC-4, Mischa ter Smitten wrote:
Try to quote the command

Paul Markham

unread,
Jul 31, 2015, 8:32:57 PM7/31/15
to Ansible Project, mis...@tersmitten.nl
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.


Bob Tanner

unread,
Aug 2, 2015, 6:04:19 PM8/2/15
to Ansible Project
What version of ansible?

Phill Pafford

unread,
Aug 3, 2015, 9:30:48 AM8/3/15
to Ansible Project
ansible --version
ansible 1.9.0.1
  configured module search path = None

On Sunday, August 2, 2015 at 6:04:19 PM UTC-4, Bob Tanner wrote:
What version of ansible?

Phill Pafford

unread,
Aug 4, 2015, 10:17:07 PM8/4/15
to Ansible Project
I upgraded to the latest, same issue. I think it might be vagrant but still having issues
Reply all
Reply to author
Forward
0 new messages