[Puppet Users] If else statement if file exists

2014-08-18 Thread Eugene Sapozhnikov
I am trying to figure out a way to use a if statement to run multiple sets of commands depending if one file exists, but I am unable to find any good documented ways of doing this. Basic rough layout of what i would like to achieve is this: Any help on getting the correct syntax for the if st

[Puppet Users] Re: If else statement if file exists

2014-08-18 Thread Eugene Sapozhnikov
? > > On Monday, August 18, 2014 2:45:23 PM UTC-7, Eugene Sapozhnikov wrote: >> >> >> >> I am trying to figure out a way to use a if statement to run multiple >> sets of commands depending if one file exists, but I am unable to find any >> good documented way

[Puppet Users] Re: If else statement if file exists

2014-08-18 Thread Eugene Sapozhnikov
n every time puppet runs, it seems. > Is that really what you want? > > On Monday, August 18, 2014 2:45:23 PM UTC-7, Eugene Sapozhnikov wrote: >> >> >> >> I am trying to figure out a way to use a if statement to run multiple >> sets of commands depending if on

[Puppet Users] Re: If else statement if file exists

2014-08-19 Thread Eugene Sapozhnikov
Basicly I am looking for the syntax to use as a conditional in the if statement for a file exists check. On Monday, August 18, 2014 2:45:23 PM UTC-7, Eugene Sapozhnikov wrote: > > > > I am trying to figure out a way to use a if statement to run multiple sets > of commands depend

Re: [Puppet Users] Re: If else statement if file exists

2014-08-19 Thread Eugene Sapozhnikov
: > > If your file `/volumes/vol1` could be managed by Puppet somehow, you > could use if defined(File['/volumes/vol1']) as a condition. > > Not sure if it is possible in your case, > > -- > Yanis Guenane > > On 08/19/2014 12:04 PM, Eugene Sapozhnikov wrote:

Re: [Puppet Users] Re: If else statement if file exists

2014-08-20 Thread Eugene Sapozhnikov
Thanks for clearing it up. I ended up just using onlyif and unless in each exec statement. this allowed me to rcycle the same commands between the scenario of creating the volume and mounting and encrypting the volume and mounting it. Thanks On Wednesday, August 20, 2014 6:11:14 AM UTC-7, jc

[Puppet Users] Encrypting /var/lib/puppet directory on clients

2014-08-20 Thread Eugene Sapozhnikov
I have been given a project to secure our client hosts. One of the requirements was to setup an encrypted volume and mount it over /var/puppet/lib . the other requirement was to have the encryption key reside only on the puppet master. I have been able to use cryptsetup to have puppet configur