Ask Your Question

Is this java module behavior correct ?

asked 2015-03-13 04:44:57 -0600

MisterWhite gravatar image

Hello. I installed the Java SDK by using this module:

I just created a file named java.pp containing this snippet:

class { 'java':
  distribution => 'jdk',

And I applied it with "puppet apply java.pp". It worked fine.

Then, I experimented by moving the javac compiler executable away in another path.

I ran the command again and I expected it to reinstall the javac executable back at its place, but it didn't. Is that the correct behaviour? Is it a bug? I'd expect the module to check that everything is in place, but maybe I'm wrong. Thanks so much.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-07-14 02:07:39 -0600

Geoff gravatar image

Not a bug - puppet package resource wraps the OS package manager commands such as yum. To determine if a package is installed or not, puppet checks the output from say yum list java-1.6.0-openjdk and this will determine whether the package is installed or not. You can easily fool the package manager by moving files as you have proved. If you want puppet to fix this up, uninstall the package and puppet will reinstall it next time it runs.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-03-13 04:44:57 -0600

Seen: 198 times

Last updated: Mar 13 '15