Re: [Puppet Users] Execute a class if a file is not present.

2014-06-27 Thread Rich Burroughs
That should work if you have it look for the install directory. If it exists the exec won't be executed. Rich On Thursday, June 26, 2014, Seby wrote: > Yea, I'm using the exec to do all custom things. I see the create > attribute and will try it out and let you know. > > On Friday, June 27, 201

Re: [Puppet Users] Execute a class if a file is not present.

2014-06-27 Thread Juan Sierra Pons
Hi, It keeps the installation source just in case, so if you delete the installation directory next time puppet agent runs it is not necessary to download it again as the already download source is used. I think is a clever idea if you don't have disk space constraints. Anyway it shouldn't be dif

Re: [Puppet Users] Execute a class if a file is not present.

2014-06-27 Thread Seby
Juan, I don't see the puppet-java removing the installation file after the deployment. Regards, Seby. On Friday, June 27, 2014 12:20:52 PM UTC+5:30, Seby wrote: > > Juan, > > Let me see if I can adapt it to my need. I'll let you know the result. > > Thanks, > SFK. > > On Friday, June 27, 2014

Re: [Puppet Users] Execute a class if a file is not present.

2014-06-26 Thread Seby
Juan, Let me see if I can adapt it to my need. I'll let you know the result. Thanks, SFK. On Friday, June 27, 2014 12:10:46 PM UTC+5:30, Juan Sierra Pons wrote: > > Hi > > Another options is to modify another module that acomplishes your > final goal. For example this one: > https://github.c

Re: [Puppet Users] Execute a class if a file is not present.

2014-06-26 Thread Seby
Hi Jose, I tried to add a custom fact on master to check a file which is not working when I run from agent. Regards, Seby. On Friday, June 27, 2014 12:04:56 PM UTC+5:30, Jose Luis Ledesma wrote: > > You can create a custom fact that reports if the tomcat is installed or > not, and do the inst

Re: [Puppet Users] Execute a class if a file is not present.

2014-06-26 Thread Seby
Yea, I'm using the exec to do all custom things. I see the create attribute and will try it out and let you know. On Friday, June 27, 2014 11:08:25 AM UTC+5:30, Rich Burroughs wrote: > > How are you doing the installation? With an exec? If so there are some > notes about making those idempotent

Re: [Puppet Users] Execute a class if a file is not present.

2014-06-26 Thread Juan Sierra Pons
Hi Another options is to modify another module that acomplishes your final goal. For example this one: https://github.com/7terminals/puppet-java This one copy the java source code to the agent, then extract it. It is already idempotent so new puppet run will not do anything. With a few modifica

Re: [Puppet Users] Execute a class if a file is not present.

2014-06-26 Thread José Luis Ledesma
You can create a custom fact that reports if the tomcat is installed or not, and do the installation process in this case. Moreover you could add the tomcat version to this custom fact too. This way you will have an inventory, can decide when apply a patch and when not ... Regards, El 27/06/2014

Re: [Puppet Users] Execute a class if a file is not present.

2014-06-26 Thread Rich Burroughs
How are you doing the installation? With an exec? If so there are some notes about making those idempotent on the type reference page: http://docs.puppetlabs.com/references/latest/type.html#exec Have a look at the creates attribute. If it's not an exec, maybe provide some code so people have an

[Puppet Users] Execute a class if a file is not present.

2014-06-26 Thread Seby
Hi Puppet experts, I'm trying to install tomcat7*tar.gz on few puppet-agent machines. I've defined a class that will create a user/group and copy the source file from puppet-master then extracts the tomcat*.tar.gz file to its home directory and deletes the source file. This seems to be working.