Ansible fails when installing requirements with "print "- the specified version (%s) was not found in the list of available versions." % role.version"

31 views
Skip to first unread message

Michael Merritt

unread,
Jun 15, 2015, 5:27:26 PM6/15/15
to ansible...@googlegroups.com
I have a fairly straightforward playbook that I'm executing in Ansible 1.9.1 which fails regarding the version not being found. I've tried specifying and not specifying the version in the requirements.yml. The role does get successfully downloaded with the url that ansible output is displaying but the command is aborted. Is this a bug? Or am I missing some configuration step or typo'ing something?

Mac 10.9.5

provision-consul.yml
---
- name: Provision host with Consul
  hosts: all
  sudo: True

  tasks:
      - name: Install Consul role from Ansible Galaxy
        command: ansible-galaxy install -r /vagrant/etc/base-images/Consul/requirements.yml


requirements.yml
---
- name: consul
  src: savagegus.consul
  version: 1.0.0
  path: /base-images/Consul/ansible/inventory/roles



Output:

stderr: Traceback (most recent call last):
  File "/usr/local/bin/ansible-galaxy", line 5, in <module>
    pkg_resources.run_script('ansible==1.8', 'ansible-galaxy')
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 735, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1652, in run_script
    exec(code, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/ansible-1.8-py2.7.egg/EGG-INFO/scripts/ansible-galaxy", line 900, in <module>
    main()
  File "/usr/local/lib/python2.7/dist-packages/ansible-1.8-py2.7.egg/EGG-INFO/scripts/ansible-galaxy", line 894, in main
    fn(args, options, parser)
  File "/usr/local/lib/python2.7/dist-packages/ansible-1.8-py2.7.egg/EGG-INFO/scripts/ansible-galaxy", line 770, in execute_install
    print "- the specified version (%s) was not found in the list of available versions." % role.version
AttributeError: 'dict' object has no attribute 'version'
stdout: - downloading role 'consul', owned by savagegus

FATAL: all hosts have already failed -- aborting
Reply all
Reply to author
Forward
0 new messages