Module update_alternatives for Debian/Ubuntu

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

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

And my todo list just got shortened, awesome thanks!

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

Alternatives is also a Red Hat thing, so you might want to also check it there to see if there are any differences.

–Michael

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)

I don’t recall seeing a pull request, but I could be misremembering.

one was rejected, i put on my list to ‘fix it up for acceptance’ but haven’t gotten around to it yet.

Keen to see this in Ansible Core too - does anyone have a link to any previous pull request ?

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

Yep, that command won’t hurt anything so it would be fine to run that way.