Module update_alternatives for Debian/Ubuntu

429 views
Skip to first unread message

Philipp Grau

unread,
Oct 31, 2012, 4:54:21 AM10/31/12
to ansible...@googlegroups.com
Hello,

to get my feet wet with ansible I wrote a small module that handles the
update-alternative command
(http://www.debian-administration.org/articles/91) on Debian/Ubuntu systems.
It is about setting the default application for awk (gwak|nawk|mawk) or
x-browser and stuff like that. Even handling of diffrent java installations
is possible.

It's small and simple but "works for me"(tm). You can have a look here:

https://github.com/phgrau/ansible-stuff

Feedback is welcome.

Kind regards,

Philipp

Lorin Hochstein

unread,
Jun 16, 2013, 3:54:15 PM6/16/13
to ansible...@googlegroups.com
Hi Phillip:

Just today, I had a need for this module on Ubuntu, and I was very happy to discover that it existed already. I've tested it out, and it works for me as well. Could you contribute this to the upstream ansible project? 

Lorin



--





--
Lorin Hochstein
Lead Architect - Cloud Services
Nimbis Services, Inc.

Brian Coca

unread,
Jun 16, 2013, 9:33:54 PM6/16/13
to ansible...@googlegroups.com
And my todo list just got shortened, awesome thanks!

Just send a pull request to the ansible project to get it merged into core.


--
Brian Coca
Stultorum infinitus est numerus
0110000101110010011001010110111000100111011101000010000001111001011011110111010100100000011100110110110101100001011100100111010000100001
Pedo mellon a minno

Michael DeHaan

unread,
Jun 16, 2013, 11:46:41 PM6/16/13
to ansible...@googlegroups.com
Alternatives is also a Red Hat thing, so you might want to also check it there to see if there are any differences.

--Michael




--
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 ansible-proje...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Michael DeHaan <mic...@ansibleworks.com>
CTO, AnsibleWorks, Inc.
http://www.ansibleworks.com/

Ali-Akber Saifee

unread,
Aug 11, 2013, 11:15:44 PM8/11/13
to ansible...@googlegroups.com
Hi, 
Was there any progress on bringing this module into ansible core? If not, is there anything I can do to help? (I'd like to use the module and would rather not copy/paste)

Michael DeHaan

unread,
Aug 12, 2013, 5:09:49 PM8/12/13
to ansible...@googlegroups.com
I don't recall seeing a pull request, but I could be misremembering.


--
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 ansible-proje...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Brian Coca

unread,
Aug 12, 2013, 5:26:59 PM8/12/13
to ansible...@googlegroups.com
one was rejected, i put on my list to 'fix it up for acceptance' but haven't gotten around to it yet.

Ben Turner

unread,
Feb 27, 2014, 7:12:23 PM2/27/14
to ansible...@googlegroups.com
Keen to see this in Ansible Core too - does anyone have a link to any previous pull request ?

Petros Moisiadis

unread,
Feb 28, 2014, 4:10:34 AM2/28/14
to ansible...@googlegroups.com
--
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 ansible-proje...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

If you don't need this task to be idempotent, you can use something like this:

- name: Update debian alternatives
  command: /usr/sbin/update-alternatives --set {{ item.name }} {{ item.path }}
  with_items:
    - name: editor
      path: /usr/bin/vim.basic

Michael DeHaan

unread,
Feb 28, 2014, 9:05:12 AM2/28/14
to ansible...@googlegroups.com
Yep, that command won't hurt anything so it would be fine to run that way.




Reply all
Reply to author
Forward
0 new messages