Closed MarcosMenegazzo closed 9 years ago
I've just checked Ansible 1.6.3 and tried again. It works. I think now is necessary to try newer versions and check where it fails.
This is happening since Ansible 1.8.0.
I'm seeing a similar issue on:
ansible 1.9 (devel 556d4f0025) last updated 2015/01/28 16:59:41 (GMT -700)
Vagrant 1.7.2
OSX 10.10.2
the update-alternatives groups for:
"redis-benchmark",
"redis-check-aof",
"redis-check-dump",
"redis-cli",
"redis-sentinel",
"redis-server"
don't appear to exist. getting this error message for each group above:
failed: [my-host] => (item=redis-server) => {"cmd": "/usr/bin/update-alternatives --set redis-server /opt/redis/bin/redis-server", "failed": true, "item": "redis-server", "rc": 2}
stderr: update-alternatives: error: no alternatives for redis-server
msg: update-alternatives: error: no alternatives for redis-server
i think the solution could be something like checking the alternatives system for each group. if it doesn't exist, then do --install
instead of --set
. though this could just be a symptom of a larger issue.
Thanks for reporting this. I was able to reproduce this on the current HEAD of Ansible. It is likely a regression in the alternatives
module; I'll look into a sound solution there.
@MarcosMenegazzo I'm unable to reproduce the issue on versions of Ansible prior to 1.9.x. Could you give me more details about your build environment? Specifically the target guest distribution. I tested on the past two Ubuntu LTS releases and didn't seem to have any problems.
Hello @DavidWittman, I'm running ansible over Ubuntu 14.04, and my vagrant VM is Ubuntu Precise 32 (12.04 i think). First i tried your script with Ansible HEAD, i got that error you saw. Then i checked tag 1.6.3 and it worked well. And after that, i tried to checked every newer tag of Ansible until i get the error again, and the error reappeared with Ansible 1.8.0.
Hi @DavidWittman is there a fix for this in the mean-time? This is a blocker for us. Thanks!
The alternatives
module seems to be broken in a bad way. See https://github.com/ansible/ansible-modules-extras/issues/12 for more details.
I'm going to be removing the add redis binaries to alternatives
task until it is stable.
@MarcosMenegazzo @ilganeli @hq-bot I "fixed" this issue by removing these tasks for now.
I also opened a pull request upstream to fix the root of the problem in the alternatives
module.
Let me know if you're still having any issues.
I'm also seeing this error with Ansible 1.9.0.1.
@ruebrenda Are you using the latest version of this role? I removed the tasks which were causing these issues in this commit, which was a part of the release for version 1.0.3.
@DavidWittman Somehow I ended up here when I was googling for how to resolve this same error on the Ansible alternatives module. I'm not using redis in my project at all... it was your comment on Mar 13 that prompted my "me too". I.e., this PR: https://github.com/ansible/ansible-modules-extras/pull/313
Sorry for the confusion.
@DavidWittman I think I see now. Looks like your merged PR hasn't made it to the release, yet.
Hello, i'm trying to use your role script to configure a vagrant virtual machine.
My playbook:
Running "vagrant up" i get:
Seems to be an issue with ansible, but i have no idea where to start.
Any tips will be welcome.