Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

ansible-galaxy fails during install #482

Closed
mamoschli opened this issue Feb 29, 2016 · 17 comments
Closed

ansible-galaxy fails during install #482

mamoschli opened this issue Feb 29, 2016 · 17 comments

Comments

@mamoschli
Copy link

Hi,
I upgraded to the latest version of DrupalVM and now I'm not able to run ansible-galaxy install.
I get the following output:

- downloading role 'php', owned by geerlingguy
https://galaxy.ansible.comhttps://galaxy.ansible.com/api/v1/roles/432/versions/?page=2&page_size=50
Traceback (most recent call last):
  File "/usr/local/Cellar/ansible/1.9.4/libexec/bin/ansible-galaxy", line 959, in <module>
    main()
  File "/usr/local/Cellar/ansible/1.9.4/libexec/bin/ansible-galaxy", line 953, in main
    fn(args, options, parser)
  File "/usr/local/Cellar/ansible/1.9.4/libexec/bin/ansible-galaxy", line 819, in execute_install
    if len(role_versions) > 0:
TypeError: object of type 'NoneType' has no len()

According to homebrew the latest ansible version is installed. I'm on Mac OS X 10.11.3.

Thanks for your help.

@oxyc
Copy link
Collaborator

oxyc commented Feb 29, 2016

Seems you are getting the same problem as #339 (comment). No clue what this is caused by though. Might even be upstream like @luckyape says.

@geerlingguy
Copy link
Owner

Gah, I just ran into this in some testing too. I'm offline most of the morning so can't investigate now, but I'm hoping there's some simple fix, either in the upstream role or in Galaxy...

@geerlingguy
Copy link
Owner

I wonder if this could be an issue with Galaxy and the number of tags there are for the PHP role; can you try once more, as I reimported it on Galaxy. If it's Galaxy, the hack suggested in #339 might be the best short term solution.

@geerlingguy
Copy link
Owner

See also, build failure on Travis: https://travis-ci.org/geerlingguy/ansible-role-php-pecl/builds/112516942

@geerlingguy
Copy link
Owner

Apparently Galaxy 2.0.1 was also released today/last night... I wonder if that has anything to do with this.

@oxyc
Copy link
Collaborator

oxyc commented Feb 29, 2016

I opened an issue upstream ansible/galaxy-issues#134

@geerlingguy
Copy link
Owner

Thanks @oxyc - It looks like this should be fixed tonight. A temporary fix (deleting a few old tags in the repo) didn't seem to work, as they're still in Galaxy.

@backlineint
Copy link

Not sure if it helps, but the hack in #339 does in fact allow the provisioning to finish.

@mamoschli
Copy link
Author

Hi there, thanks for your help so far.
Today I noticed my Homebrew wasn't up to date and so I was working with Ansible 1.9.4. After upgrading to 2.0.1.0 the install finishes without errors. I don't know if this is still an issue for you the, if not, the ticket can be closed.

Thanks for your help.

@kgrey-uk
Copy link

kgrey-uk commented Mar 1, 2016

I am also having this problem when running ansible-galaxy install. My Homebrew says my ansible version of 1.9.2 is the latest version.
I feel this is resulting in an error running vagrant up where it fails on TASK: [geerlingguy.java | Ensure Java is installed.] error with_items expects a list or a set

@mamoschli
Copy link
Author

@kgrey-ikos My Homebrew told me the same. You need to brew update to get the latest formulas and then brew outdated should tell you that ansible is indeed outdated. The run brew upgrade ansible and you should have the newest version.

@oxyc
Copy link
Collaborator

oxyc commented Mar 1, 2016

The fix that ansible galaxy implemented only works for Ansible v2 apparently, so for now it is a requirement. I believe the fixes are already merged into Ansible master but it will probably take a while before new releases come out :/

@brentratliff
Copy link

It failed for me last night but just worked this morning.

@kgrey-uk
Copy link

kgrey-uk commented Mar 1, 2016

Thanks @manuelmoritz1308 that did the job for me and got vagrant up to run without errors. 👍

@ccjjmartin
Copy link
Contributor

@manuelmoritz1308: Thank you so much for your post. This gave me the answer that was right in front of my face but I couldn't see it. I needed to upgrade Ansible. Makes sense if they release a new version. I however didn't use brew to install Ansible, I used pip so my upgrade was:

sudo pip install ansible --upgrade
sudo ansible-galaxy install -r provisioning/requirements.yml --force
vagrant up

Most people probably won't have to do this but I also:
vagrant destroy - deleted my vm
vagrant box update - updated the base box
vagrant up

Downloads of requirements now work but with a fresh box setup (with PHP 7.0 and MariaDB) I received:

TASK [Add repository for PHP 7.0.] *********************************************
fatal: [drupalvm]: FAILED! => {"changed": false, "failed": true, "msg": "failed to fetch PPA information, error was: HTTP Error 404: Not Found"}

Created new issue #491 with a temporary fix of downgrading back to PHP 5.6 which allows the provisioning to finish with MariaDB.

@geerlingguy
Copy link
Owner

I think this is resolved now—the PHP 7.0 issue should be working at this point too.

@malcomio
Copy link

malcomio commented Mar 4, 2016

I also hit the same issue, and after trying to update ansible, I eventually fixed it by editing my local ansible-galaxy file with the changes from ansible/ansible@d2bd660

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants