Hi all,

I was trying to use the alternatives module to set up a new version of Ruby 
with Ansible 1.9.4 (both ends), and ran into problems. 

I used the apt module to uninstall Ruby 2.1 and to install Ruby 2.2. Then, 
I wanted to make sure that 2.2 was the default for /usr/bin/ruby, 
/usr/bin/gem, and /usr/bin/rake. However, the alternatives symlinks don't 
seem to get created.

Here's an example of an ad-hoc command I'm running:

23:41 $ ansible 'tag_Stages_preproduction:&tag_app_true' -m alternatives -a 
'name=ruby path=/usr/bin/ruby2.2 link=/usr/bin/ruby' --sudo

52.91.69.251 | success >> {

    "changed": false

}


But if I go to that server and look, /usr/bin/ruby isn't there.


Wades-WeaveUp-Mac:~ minter$ ssh 52.91.69.251 ls /usr/bin/ruby

ls: cannot access /usr/bin/ruby: No such file or directory


If I run the update-alternatives command that I think the module does by 
hand, it does work.


root@preprod-app01:~# update-alternatives --install /usr/bin/ruby ruby 
/usr/bin/ruby2.2 0

root@preprod-app01:~# /usr/bin/ruby --version

ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-linux-gnu]


Am I missing something here?


--Wade

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c7a0516c-3cdf-48fe-9f81-50d77fe588d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to