Re: [Puppet Users] compare two variables via regex

2014-12-05 Thread Ramin K
On 12/5/14 3:16 PM, Lori Cho wrote: I have two variables and I want to compare them to each other. However, the regex doesn't return true, because it seems to treat the variable in the // as a literal. Something like this: $variable1 = 'foo' $variable2 = 'foobar' if($variable2 =~ /$variable1/

[Puppet Users] compare two variables via regex

2014-12-05 Thread Lori Cho
I have two variables and I want to compare them to each other. However, the regex doesn't return true, because it seems to treat the variable in the // as a literal. Something like this: $variable1 = 'foo' $variable2 = 'foobar' if($variable2 =~ /$variable1/) { notify {"it works":} }

Re: [Puppet Users] puppet agent upgrade on windows

2014-12-05 Thread Rob Reynolds
On Wed, Dec 3, 2014 at 9:43 AM, Jason Chinsen wrote: > Hello There, > > We started our puppet adventures at 3.2.x with both windows and linux > boxes. Since then we have upgraded our Master to 3.3.2 and are looking to > upgrade to 3.7. The linux agent upgrades are very simple, but I am running >

[Puppet Users] Re: Installing a package purely with Hiera configuration

2014-12-05 Thread Andy Taylor
That'll work fine for now, but if you throw everything into site.pp it can become difficult to manage and inflexible pretty quickly. Have a look at this part of the docs: https://docs.puppetlabs.com/learning/modules1.html Specifically from the "The End of One Huge Manifest" heading. Andy On

[Puppet Users] Re: Question about yum provider of package resource ?

2014-12-05 Thread jcbollinger
On Friday, December 5, 2014 1:50:10 AM UTC-6, Richard wrote: > > Hi! > > I intsalled mysql through puppet using 'mysql-server' as package > name , but when i want to remove mysql from my centos6.3 system, i get some > problems. > first i change the package attribute ensure =

[Puppet Users] Re: Installing a package purely with Hiera configuration

2014-12-05 Thread Brantley Hobbs
Since it's such a core component, I have added the type you suggested to my site.pp manifest and it works just fine. Is there a better place for it? Thanks for your help! On Friday, December 5, 2014 7:55:46 AM UTC-5, Andy Taylor wrote: > > Hiera is just a source of data - you need to have Puppe

Re: [Puppet Users] Re: Installing a package purely with Hiera configuration

2014-12-05 Thread Cristian Falcas
Hi, You can use in your main manifest something like this: hiera_include('classes', '') This will load classes from hiera. Parameters for those classes can be set from hiera also: "myfirewall::block_iptables": true Best regards, Cristian Falcas On Fri, Dec 5, 2014 at 2:55 PM, Andy Taylor w

[Puppet Users] Re: Installing a package purely with Hiera configuration

2014-12-05 Thread Andy Taylor
Hiera is just a source of data - you need to have Puppet manifests/modules which interpet the data and act on it. You can achieve installation of packages from Hiera data by using defined types and the create_resources function: https://docs.puppetlabs.com/learning/definedtypes.html https://do

[Puppet Users] Re: Question about yum provider of package resource ?

2014-12-05 Thread Richard
thanks very much. 在 2014年12月5日星期五UTC+8下午3时50分10秒,Richard写道: > > Hi! > > I intsalled mysql through puppet using 'mysql-server' as package > name , but when i want to remove mysql from my centos6.3 system, i get some > problems. > first i change the package attribute ensure =>

Re: [Puppet Users] Question about yum provider of package resource ?

2014-12-05 Thread Thomas Hager
On 2014-12-05 08:50, Richard wrote: Hi! Hi, [...] but when i run command 'rpm -qa| grep mysql' , i find that mysql still in my system. mysql-connector-java-5.1.17-6.el6.noarch mysql-community-release-el6-5.noarch mysql-community-client-5.6.22-2.el6.x86_64 mysql-community-common-5.6.22-2.el6

[Puppet Users] Re: Question about yum provider of package resource ?

2014-12-05 Thread Richard
when i set the ensure to purged not absent, i find that i remove mysql-sever package from my system and puppet agent run command ' yum -y erase mysql-server ' at debug messages 在 2014年12月5日星期五UTC+8下午3时50分10秒,Richard写道: > > Hi! > > I intsalled mysql through puppet using 'mysql-server' a