Re: [ansible-project] Oracle Java module

773 views
Skip to first unread message

Michael DeHaan

unread,
Jan 25, 2013, 4:08:56 PM1/25/13
to ansible...@googlegroups.com
Parts of this are duplicating a lot of modules we already have in many
ways (apt, yum, apt key, apt add repository, etc) so I would be very
tempted to see if this could just be a playbook or a task include file
for those parts, and then maybe the last part remains a custom module.

Though really I think I'd be inclined to download it and put it in a
yum repo, or just copy the content locally and use get_url with it,
followed up by command to run the binary installer.

You could use facts to help with selecting the right thing to run, and
conditionals to choose yum/apt as needed be if you wanted.

On Fri, Jan 25, 2013 at 3:03 PM, <li...@glendenning.net> wrote:
> I have developed an Ansible module that installs Oracle Java (JDK or JRE,
> version 6 or 7) on Ubuntu/Fedora.
>
> https://github.com/lisaglendenning/ansible_java
>
> In case anyone else finds it useful. Feedback welcome.
>
> Cheers,
> Lisa
>
> --
>
>

Brian Coca

unread,
Jan 25, 2013, 4:09:59 PM1/25/13
to ansible...@googlegroups.com
Looks good, just not sure why you re implemented apt/yum as you should
be able to chain into the existing modules.

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

Michael DeHaan

unread,
Jan 25, 2013, 4:13:15 PM1/25/13
to ansible...@googlegroups.com
On Fri, Jan 25, 2013 at 4:09 PM, Brian Coca <bria...@gmail.com> wrote:
> Looks good, just not sure why you re implemented apt/yum as you should
> be able to chain into the existing modules.

There's no daisy chaining anymore, actually. And it's more efficient that way.

There are built-in functions so modules like copy can access the
functions of modules like file.

To me, I think, this could /probably/ be simplified to a playbook of
maybe 30-40 lines, unless you were really concerned about it only
being one hop.

Code quality is great though :)

Brian Coca

unread,
Jan 25, 2013, 4:18:50 PM1/25/13
to ansible...@googlegroups.com
Damn, missed when this happened, probably when copy/file functions got
moved into common.

On Fri, Jan 25, 2013 at 4:13 PM, Michael DeHaan
> There's no daisy chaining anymore, actually. And it's more efficient that way.
>
> There are built-in functions so modules like copy can access the
> functions of modules like file.



li...@glendenning.net

unread,
Jan 29, 2013, 6:14:09 PM1/29/13
to ansible...@googlegroups.com
Thanks for the feedback. I'm aware of the icky code duplication issues, and this was because it didn't look like I could call into other modules or non-standard libraries. This module started life as a playbook until it just became way too complicated for that format.

Jon Thor Austen

unread,
Apr 23, 2014, 10:21:57 PM4/23/14
to ansible...@googlegroups.com
Can you add information on how to run this playbook/module (or whatever it is) ?   I'm inclined to think I can run it with just Python by calling 'python java.py',  but I doubt it is that straightforward?

Lisa Glendenning

unread,
May 1, 2014, 1:00:21 PM5/1/14
to ansible...@googlegroups.com
It's an Ansible module.


On Wed, Apr 23, 2014 at 7:21 PM, Jon Thor Austen <aust...@gmail.com> wrote:
Can you add information on how to run this playbook/module (or whatever it is) ?   I'm inclined to think I can run it with just Python by calling 'python java.py',  but I doubt it is that straightforward?

--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/S5kZUipYKjg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/07e13de8-f409-4f19-adcf-51554476811e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joost Cassee

unread,
May 1, 2014, 5:53:37 PM5/1/14
to ansible...@googlegroups.com
For what it's worth, I recently created a role for installing Sun Java on Ubuntu. It's not as generic as Lisa's module, but could maybe serve as a foundation for something better.


Some notes:
* Installs StartSSL certificates into the cacerts keystore.
* Registers a variable because Java-based services in other roles may need to be restarted.

Regards,
Joost

Op vrijdag 25 januari 2013 22:13:15 UTC+1 schreef Michael DeHaan:

Brian Coca

unread,
May 1, 2014, 6:07:37 PM5/1/14
to ansible...@googlegroups.com
my oracle java role in galxy https://galaxy.ansible.com/list#/roles/628, there are others
Reply all
Reply to author
Forward
0 new messages