For an "enterprise" scenario, the preferred approach (imo) is to automate
packaging the jre as an rpm|deb or find a third party repo.

https://github.com/ksyz/oracle-java-rpm


On Mon, Jan 13, 2014 at 11:24 AM, Mark Casey <mark.cas...@gmail.com> wrote:

> I would worry that someone will delete /etc/java-version one day and blow
> everything up.
>
> Could you attempt to actually run something like *shell: "java --version"*and 
> then register the output to a variable? You could then put a
> *when* on the java role that checks the contents of the output, possibly
> even for a certain version.
>
> hth,
> Mark
>
>
> On Saturday, January 11, 2014 4:48:09 PM UTC-6, Randy Kahle wrote:
>>
>> Installing Oracle Java is not straight forward because it is not
>> delivered via Apt or in an RPM.
>>
>> I have written a role, "java", that does this work and I want to be able
>> to detect that Java is already installed when this role is requested
>> subsequently so that I do not run its steps.
>>
>> What is the best practice approach to indicate that "Java is already
>> installed"?
>>
>> I can see putting a marker file somewhere - such as /etc/java-version
>> and the contents would have the version number and then the role steps
>> could have a conditional looking for this marker. However, this approach
>> does not seem very elegant.
>>
>> Suggestions for a best practices solution for this?
>>
>> Thank you!
>>
>> Randy
>>
>>  --
> 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-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to