Re: [Puppet Users] Manage delivery and execution of RPMs not in YUM

2017-03-02 Thread Dan White
+1
To manage an RPM not in yum, put it into yum.

> On Mar 2, 2017, at 11:02 AM, Garrett Honeycutt  
> wrote:
> 
>> On 3/2/17 9:58 AM, warron.french wrote:
>> Hello all,
>> can someone please advise me on a proper set of syntax (a file to look
>> at) for an example to follow to solve the following challenge:
>> 
>> 1. I have 2 deliver 2 *.rpm files that are not in a YUM repository, so
>>I dropped them into the files directory of my module path.
>> 2. I need to be able to execute each of them either together, or   
>>_A.rpm before B.rpm_
>> 3. __Then execute a shell script that requires the 2 RPMs to be in
>>place before that happens.
>> 
>> I am starting to get into slightly more complicated modules, instead of
>> simply delivering basic ASCII text files using  *content =>
>> template('modulename/some.erb')*.
>> 
>> I just need an example that is know to provide proper execution, proper
>> syntax, and something I can learn from correctly.  I am still building
>> the foundation of my understanding, so troubleshooting someone else's
>> code isn't going to be too good for my development yet.
>> 
>> 
>> Thank you in advance,
>> --
>> Warron French
>> 
> 
> Hi Warron,
> 
> What you want to accomplish is a bad idea and you should use a yum repo
> and definitely not check in binary data with your modules. You could at
> least store the rpm's somewhere and then download them from that
> canonical source. Take a look at Artifactory which can help with where
> to store things such as your random rpm's.
> 
> Sometimes you have to automate what you have before you build something
> better. Suggest writing an exec resource that can handle what you are
> trying to do. The key here is to have two commands. One that checks to
> see if you are already in the desired state and another to get you to
> the desired state. Figure that out without Puppet and once you have
> those commands, you can write a manifest.
> 
> Best regards,
> -g
> 
> -- 
> Garrett Honeycutt
> @learnpuppet
> Puppet Training with LearnPuppet.com
> Mobile: +1.206.414.8658
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/4fc045bb-3e5f-f9d4-88a6-688ca3e3436b%40garretthoneycutt.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/B4A783AE-1CCE-4596-8372-455CD38CCE5A%40icloud.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Manage delivery and execution of RPMs not in YUM

2017-03-02 Thread Rob Nelson
We should note that yumrepo is a native type in puppet that you can use to
manage the remote repo information on nodes, and there's a (from memory)
palli/createrepo module to create and maintain the yum repo itself. It's
not that difficult to add createrepo to a role and set up a node as your
internal yum repo if you'd rather start there instead of spacewalk or
artifactory and the like.

On Thu, Mar 2, 2017 at 6:33 PM Rob Nelson  wrote:

> For clarity, because I had to reread this twice to get the context:
> VERSION CONTROL repositories should never contain binary objects.
>
> Just want to differentiate that from yum repositories.
>
> On Thu, Mar 2, 2017 at 2:11 PM Andrew Grimberg 
> wrote:
>
> Repositories should _never_ contain binary objects. The only exception I
> ever allow my developers is graphical assets related to websites.
>
> On 03/02/2017 08:48 AM, warron.french wrote:
> > Garrett, thanks.
> >
> > So, to clarify for myself in terms of a BEST practice are you declaring
> > "don't deliver RPMs as part of the payload of the Puppet Module?"  *I
> > just got that part working.  :-/*  I don't mind correction, but I don't
> > want to go down the rabbit hole.
> >
> > Secondly, using an exec resource to implement the RPMs?
> >
> > Perhaps something like this...
> >
> > exec { 'install_cctk_rpms':
> >  creates => '/opt/dell/dcc/cctk',
> >  command => 'yum localinstall -y A.rpm B.rpm',
> >  returns => '0',
> > }
> >
> > I have never written an exec resource declaration before.  Can you tell
> > me if the exec syntax is correct, and that it is also what you meant for
> > having to commands; I can combine them into a single *yum localinstall
> > -y  *command correct?
> >
> > Thanks Garrett.
> >
> >
> > --
> > Warron French
> >
> >
> > On Thu, Mar 2, 2017 at 11:02 AM, Garrett Honeycutt
> > > wrote:
> >
> > On 3/2/17 9:58 AM, warron.french wrote:
> > > Hello all,
> > > can someone please advise me on a proper set of syntax (a file to
> look
> > > at) for an example to follow to solve the following challenge:
> > >
> > >  1. I have 2 deliver 2 *.rpm files that are not in a YUM
> > repository, so
> > > I dropped them into the files directory of my module path.
> > >  2. I need to be able to execute each of them either together, or
> > > _A.rpm before B.rpm_
> > >  3. __Then execute a shell script that requires the 2 RPMs to be in
> > > place before that happens.
> > >
> > > I am starting to get into slightly more complicated modules,
> instead of
> > > simply delivering basic ASCII text files using  *content =>
> > > template('modulename/some.erb')*.
> > >
> > > I just need an example that is know to provide proper execution,
> proper
> > > syntax, and something I can learn from correctly.  I am still
> building
> > > the foundation of my understanding, so troubleshooting someone
> else's
> > > code isn't going to be too good for my development yet.
> > >
> > >
> > > Thank you in advance,
> > > --
> > > Warron French
> > >
> >
> > Hi Warron,
> >
> > What you want to accomplish is a bad idea and you should use a yum
> repo
> > and definitely not check in binary data with your modules. You could
> at
> > least store the rpm's somewhere and then download them from that
> > canonical source. Take a look at Artifactory which can help with
> where
> > to store things such as your random rpm's.
> >
> > Sometimes you have to automate what you have before you build
> something
> > better. Suggest writing an exec resource that can handle what you are
> > trying to do. The key here is to have two commands. One that checks
> to
> > see if you are already in the desired state and another to get you to
> > the desired state. Figure that out without Puppet and once you have
> > those commands, you can write a manifest.
> >
> > Best regards,
> > -g
> >
> > --
> > Garrett Honeycutt
> > @learnpuppet
> > Puppet Training with LearnPuppet.com
> > Mobile: +1.206.414.8658 
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Puppet Users" group.
> > To unsubscribe from this group and stop receiving emails from it,
> > send an email to puppet-users+unsubscr...@googlegroups.com
> > .
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/puppet-users/4fc045bb-3e5f-f9d4-88a6-688ca3e3436b%40garretthoneycutt.com
> > <
> https://groups.google.com/d/msgid/puppet-users/4fc045bb-3e5f-f9d4-88a6-688ca3e3436b%40garretthoneycutt.com
> >.
> > For more options, visit https://groups.google.com/d/optout
> 

Re: [Puppet Users] Manage delivery and execution of RPMs not in YUM

2017-03-02 Thread Rob Nelson
For clarity, because I had to reread this twice to get the context: VERSION
CONTROL repositories should never contain binary objects.

Just want to differentiate that from yum repositories.

On Thu, Mar 2, 2017 at 2:11 PM Andrew Grimberg 
wrote:

> Repositories should _never_ contain binary objects. The only exception I
> ever allow my developers is graphical assets related to websites.
>
> On 03/02/2017 08:48 AM, warron.french wrote:
> > Garrett, thanks.
> >
> > So, to clarify for myself in terms of a BEST practice are you declaring
> > "don't deliver RPMs as part of the payload of the Puppet Module?"  *I
> > just got that part working.  :-/*  I don't mind correction, but I don't
> > want to go down the rabbit hole.
> >
> > Secondly, using an exec resource to implement the RPMs?
> >
> > Perhaps something like this...
> >
> > exec { 'install_cctk_rpms':
> >  creates => '/opt/dell/dcc/cctk',
> >  command => 'yum localinstall -y A.rpm B.rpm',
> >  returns => '0',
> > }
> >
> > I have never written an exec resource declaration before.  Can you tell
> > me if the exec syntax is correct, and that it is also what you meant for
> > having to commands; I can combine them into a single *yum localinstall
> > -y  *command correct?
> >
> > Thanks Garrett.
> >
> >
> > --
> > Warron French
> >
> >
> > On Thu, Mar 2, 2017 at 11:02 AM, Garrett Honeycutt
> > > wrote:
> >
> > On 3/2/17 9:58 AM, warron.french wrote:
> > > Hello all,
> > > can someone please advise me on a proper set of syntax (a file to
> look
> > > at) for an example to follow to solve the following challenge:
> > >
> > >  1. I have 2 deliver 2 *.rpm files that are not in a YUM
> > repository, so
> > > I dropped them into the files directory of my module path.
> > >  2. I need to be able to execute each of them either together, or
> > > _A.rpm before B.rpm_
> > >  3. __Then execute a shell script that requires the 2 RPMs to be in
> > > place before that happens.
> > >
> > > I am starting to get into slightly more complicated modules,
> instead of
> > > simply delivering basic ASCII text files using  *content =>
> > > template('modulename/some.erb')*.
> > >
> > > I just need an example that is know to provide proper execution,
> proper
> > > syntax, and something I can learn from correctly.  I am still
> building
> > > the foundation of my understanding, so troubleshooting someone
> else's
> > > code isn't going to be too good for my development yet.
> > >
> > >
> > > Thank you in advance,
> > > --
> > > Warron French
> > >
> >
> > Hi Warron,
> >
> > What you want to accomplish is a bad idea and you should use a yum
> repo
> > and definitely not check in binary data with your modules. You could
> at
> > least store the rpm's somewhere and then download them from that
> > canonical source. Take a look at Artifactory which can help with
> where
> > to store things such as your random rpm's.
> >
> > Sometimes you have to automate what you have before you build
> something
> > better. Suggest writing an exec resource that can handle what you are
> > trying to do. The key here is to have two commands. One that checks
> to
> > see if you are already in the desired state and another to get you to
> > the desired state. Figure that out without Puppet and once you have
> > those commands, you can write a manifest.
> >
> > Best regards,
> > -g
> >
> > --
> > Garrett Honeycutt
> > @learnpuppet
> > Puppet Training with LearnPuppet.com
> > Mobile: +1.206.414.8658 
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Puppet Users" group.
> > To unsubscribe from this group and stop receiving emails from it,
> > send an email to puppet-users+unsubscr...@googlegroups.com
> > .
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/puppet-users/4fc045bb-3e5f-f9d4-88a6-688ca3e3436b%40garretthoneycutt.com
> > <
> https://groups.google.com/d/msgid/puppet-users/4fc045bb-3e5f-f9d4-88a6-688ca3e3436b%40garretthoneycutt.com
> >.
> > For more options, visit https://groups.google.com/d/optout
> > .
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Puppet Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> > an email to puppet-users+unsubscr...@googlegroups.com
> > .
> > To view this discussion on the web visit
> >
> 

[Puppet Users] Re: What's the best way to deal with multiple OS's

2017-03-02 Thread Michael Watters
This is pretty much exactly what module data is for.  Check 
out https://docs.puppet.com/puppet/4.9/lookup_quick_module.html for more 
details.


On Friday, September 30, 2011 at 2:33:50 PM UTC-4, Jeff Falgout wrote:
>
> We're in the situation of dealing with multiple operating systems (and 
> will likely add another) and I'm quickly realizing that building logic in 
> the manifest to deal with the differences in Red Hat i386 vs Red Hat x86_64 
> vs SuSE i586 vs SuSE x86_64 vs Mac is getting tedious. For instance, in the 
> sshd_config:
>
> SLES i586 has the sftp-server binary in a different path than the x86_64 
> version and it's different than RHEL - so I end up with logic as such:
>
> # Set the SFTP Path
> if $lsbdistid == 'SUSE LINUX' {
>if $architecture == 'x86_64' {
>   $sftppath = '/usr/lib64/ssh/sftp-server'
>} else {
>   $sftppath = '/usr/lib/ssh/sftp-server'
>}
> } else {
>$sftppath = "/usr/libexec/openssh/sftp-server"
> }
>
>
> Is there a better way to deal with different OS's or is the long and 
> winding road of config mgmt?
>
> Do people do something like:
>
> include ssh::server::$operatingsystem
>
> class ssh::server::RedHat {
>   blah
> }
>
> class ssh::server::SLES {
>   blah
> }
>
>
> Different modulepath? Different puppet servers based on OS? 
>
> Cheers,
>
> Jeff
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/55a8b25b-a8c3-400d-911f-2864cc2c4428%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet activemq not starting

2017-03-02 Thread Chandrakanth Reddy
I got the same thing. When i ran "service pe-activemq start",i got..

INFO: Loading '/etc/sysconfig/pe-activemq'
INFO: Using java '/opt/puppet/lib/jvm/pe-java/jre/bin/java'
INFO: Starting - inspect logfiles specified in logging.properties and 
log4j.properties to get details
INFO: changing to user 'pe-activemq' to invoke java
INFO: pidfile created : '/var/run/pe-activemq/pe-activemq.pid' (pid '29776')


It doesn't seem to fail anywhere. But the status is still same. 
(pe-activemq not running)
Also my puppet enterprise verion is 3.7.2.

Please help. Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/7997ff2d-dda5-4062-a98a-3947a9442f58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Manage delivery and execution of RPMs not in YUM

2017-03-02 Thread Rich Burroughs
There are a number of reasons it's not a great idea to put them in the
module, but one is that if you start sticking binary artifacts into your
Puppet code, the size of the repos(s) will grow a lot and it will be much
slower to clone them. Also it's just not how people expect things to work.

Say you onboard a new member of your team and they need to deal with that
RPM -- your Puppet module is probably the last place they would ever look
for it. Beyond the technical reasons, I think this is an important one. The
less snowflakey you can make your automation, the easier it's going to be
for new folks to learn to work with it.

Lots of good suggestions in the thread: setting up a Yum repo, or using an
artifact repository like Artifactory or Nexus. At my last shop we used
Spacewalk:

http://spacewalk.redhat.com/

At my first job where I did Puppet like 4-5 years ago we had Solaris hosts
that used a lot of custom packages. We served those up with just a vanilla
HTTP server and used wget to pull them down in our Puppet code. Pretty ugly
but still better than checking them in with the modules themselves.

Whenever you can leverage your OS's native packaging system, you're going
to make it easier on yourself and your coworkers.


Rich



On Thu, Mar 2, 2017 at 6:58 AM, warron.french 
wrote:

> Hello all,
> can someone please advise me on a proper set of syntax (a file to look at)
> for an example to follow to solve the following challenge:
>
>
>1. I have 2 deliver 2 *.rpm files that are not in a YUM repository, so
>I dropped them into the files directory of my module path.
>2. I need to be able to execute each of them either together, or*A.rpm
>before B.rpm*
>3. Then execute a shell script that requires the 2 RPMs to be in place
>before that happens.
>
> I am starting to get into slightly more complicated modules, instead of
> simply delivering basic ASCII text files using  *content =>
> template('modulename/some.erb')*.
>
> I just need an example that is know to provide proper execution, proper
> syntax, and something I can learn from correctly.  I am still building the
> foundation of my understanding, so troubleshooting someone else's code
> isn't going to be too good for my development yet.
>
>
> Thank you in advance,
> --
> Warron French
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/puppet-users/CAJdJdQkTwF4HTh8r54HZ_aNittaLZ7UMEKEZTEgpaJ9vU8R5mw%
> 40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAGceorzKTWGFQBHRoAn27wj9WU6VFcr%3DySqkZBUwASV%3DKGjRNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Manage delivery and execution of RPMs not in YUM

2017-03-02 Thread James Pryor
Warron,
And if my previous email solves #1 & #2, then #3 is an addition of an exec
resource, then adding it at the end of the dependency chain:

[root@localhost myinstallmodule]# cat manifests/init.pp
class myinstallmodule {
  exec { 'dothething':
command => 'echo "look it works!"; logger look it works',
path=> '/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin',
  }
  package { 'mesecond':
ensure => present,
  }
  package { 'mefirst':
ensure => present,
  }
  Package['mefirst'] -> Package['mesecond'] -> Exec['dothething']
}
[root@localhost myinstallmodule]# puppet apply tests/init.pp --verbose
Notice: Compiled catalog for localhost in environment production in 0.28
seconds
Info: Applying configuration version '1488482217'
Notice: /Stage[main]/Myinstallmodule/Package[mefirst]/ensure: created
Notice: /Stage[main]/Myinstallmodule/Package[mesecond]/ensure: created
Notice: /Stage[main]/Myinstallmodule/Exec[dothething]/returns: executed
successfully
Notice: Finished catalog run in 4.37 seconds
[root@localhost myinstallmodule]# tail /var/log/messages
Mar  2 14:16:59 localhost yum[13827]: Installed: mefirst-1.0.0-1.el7.x86_64
Mar  2 14:17:01 localhost yum[13840]: Installed: mesecond-1.0.0-1.el7.x86_64
Mar  2 14:17:02 localhost vagrant: look it works


I hope this has been fruitful and must bow out as I don't have any more
spare-time to give to this list today, sorry.
Regards,
James


On Thu, Mar 2, 2017 at 2:12 PM, James Pryor  wrote:

> Warron,
> Correct. Garret is right. It is not best to deliver RPMs as part of the
> payload-contents of the Puppet Module, and do not store RPMs in a git repo
> (or whatever version control system you might be using).
>
> Yes, "yum localinstall" exists and but RPMs are best delivered via the
> OS's native packaging tools like yum (or dnf) for the Red Hat family of
> Linux distribution. Even if some independent software vendor creates and
> offers RPMs for their product, those RPMs should be placed in a yum repo
> either by the vendor hosting it, or by the sysadmin locally hosting it.
>
> I have a quick and dirty example of creating a Yum repo from a directory
> of RPMs, and then using yum command to install from that repo:
> https://gist.github.com/jjpryor/67b2a4822069f57e852c3cb71bc778
> e3#create-a-yum-repo-from-directory-of-rpms
>
> What that quick and dirty example does not contain is setting up HTTPS,
> and GPG key management, and GPG signing the RPMs so that authenticity and
> integrity can be guaranteed. Those steps are usually required in following
> RPM & YUM best practices for the greater internet.
>
> So the above should solve #1 from your numbered list in your opening email.
>
> If #1 is solved via a Yum repo, then #2 is solved like so:
> [root@localhost myinstallmodule]# puppet --version
> 3.6.2
> root@localhost myinstallmodule]# tree
> .
> |-- manifests
> |   `-- init.pp
> |-- metadata.json
> |-- Rakefile
> |-- README.md
> |-- spec
> |   |-- classes
> |   |   `-- init_spec.rb
> |   `-- spec_helper.rb
> `-- tests
> `-- init.pp
>
> 4 directories, 7 files
> [root@localhost myinstallmodule]# cat manifests/init.pp
> class myinstallmodule {
>   package { 'mesecond':
> ensure => present,
>   }
>   package { 'mefirst':
> ensure => present,
>   }
>   Package['mefirst'] -> Package['mesecond']
> }
> [root@localhost myinstallmodule]# cat tests/init.pp
> include myinstallmodule
> [root@localhost myinstallmodule]# puppet apply tests/init.pp
> Notice: Compiled catalog for localhost in environment production in 0.26
> seconds
> Notice: /Stage[main]/Myinstallmodule/Package[mefirst]/ensure: created
> Notice: /Stage[main]/Myinstallmodule/Package[mesecond]/ensure: created
> Notice: Finished catalog run in 4.76 seconds
>
>
> I hope this helps.
>
> James
>
> On Thu, Mar 2, 2017 at 11:48 AM, warron.french 
> wrote:
>
>> Garrett, thanks.
>>
>> So, to clarify for myself in terms of a BEST practice are you declaring
>> "don't deliver RPMs as part of the payload of the Puppet Module?"  *I
>> just got that part working.  :-/*  I don't mind correction, but I don't
>> want to go down the rabbit hole.
>>
>> Secondly, using an exec resource to implement the RPMs?
>>
>> Perhaps something like this...
>>
>> exec { 'install_cctk_rpms':
>>  creates => '/opt/dell/dcc/cctk',
>>  command => 'yum localinstall -y A.rpm B.rpm',
>>  returns => '0',
>> }
>>
>> I have never written an exec resource declaration before.  Can you tell
>> me if the exec syntax is correct, and that it is also what you meant for
>> having to commands; I can combine them into a single *yum localinstall
>> -y  *command correct?
>>
>> Thanks Garrett.
>>
>>
>> --
>> Warron French
>>
>>
>> On Thu, Mar 2, 2017 at 11:02 AM, Garrett Honeycutt <
>> g...@garretthoneycutt.com> wrote:
>>
>>> On 3/2/17 9:58 AM, warron.french wrote:
>>> > Hello all,
>>> > can someone please advise me on a proper set of syntax (a file to look

Re: [Puppet Users] Manage delivery and execution of RPMs not in YUM

2017-03-02 Thread James Pryor
Warron,
Correct. Garret is right. It is not best to deliver RPMs as part of the
payload-contents of the Puppet Module, and do not store RPMs in a git repo
(or whatever version control system you might be using).

Yes, "yum localinstall" exists and but RPMs are best delivered via the OS's
native packaging tools like yum (or dnf) for the Red Hat family of Linux
distribution. Even if some independent software vendor creates and offers
RPMs for their product, those RPMs should be placed in a yum repo either by
the vendor hosting it, or by the sysadmin locally hosting it.

I have a quick and dirty example of creating a Yum repo from a directory of
RPMs, and then using yum command to install from that repo:
https://gist.github.com/jjpryor/67b2a4822069f57e852c3cb71bc778e3#create-a-yum-repo-from-directory-of-rpms

What that quick and dirty example does not contain is setting up HTTPS, and
GPG key management, and GPG signing the RPMs so that authenticity and
integrity can be guaranteed. Those steps are usually required in following
RPM & YUM best practices for the greater internet.

So the above should solve #1 from your numbered list in your opening email.

If #1 is solved via a Yum repo, then #2 is solved like so:
[root@localhost myinstallmodule]# puppet --version
3.6.2
root@localhost myinstallmodule]# tree
.
|-- manifests
|   `-- init.pp
|-- metadata.json
|-- Rakefile
|-- README.md
|-- spec
|   |-- classes
|   |   `-- init_spec.rb
|   `-- spec_helper.rb
`-- tests
`-- init.pp

4 directories, 7 files
[root@localhost myinstallmodule]# cat manifests/init.pp
class myinstallmodule {
  package { 'mesecond':
ensure => present,
  }
  package { 'mefirst':
ensure => present,
  }
  Package['mefirst'] -> Package['mesecond']
}
[root@localhost myinstallmodule]# cat tests/init.pp
include myinstallmodule
[root@localhost myinstallmodule]# puppet apply tests/init.pp
Notice: Compiled catalog for localhost in environment production in 0.26
seconds
Notice: /Stage[main]/Myinstallmodule/Package[mefirst]/ensure: created
Notice: /Stage[main]/Myinstallmodule/Package[mesecond]/ensure: created
Notice: Finished catalog run in 4.76 seconds


I hope this helps.

James

On Thu, Mar 2, 2017 at 11:48 AM, warron.french 
wrote:

> Garrett, thanks.
>
> So, to clarify for myself in terms of a BEST practice are you declaring
> "don't deliver RPMs as part of the payload of the Puppet Module?"  *I
> just got that part working.  :-/*  I don't mind correction, but I don't
> want to go down the rabbit hole.
>
> Secondly, using an exec resource to implement the RPMs?
>
> Perhaps something like this...
>
> exec { 'install_cctk_rpms':
>  creates => '/opt/dell/dcc/cctk',
>  command => 'yum localinstall -y A.rpm B.rpm',
>  returns => '0',
> }
>
> I have never written an exec resource declaration before.  Can you tell me
> if the exec syntax is correct, and that it is also what you meant for
> having to commands; I can combine them into a single *yum localinstall
> -y  *command correct?
>
> Thanks Garrett.
>
>
> --
> Warron French
>
>
> On Thu, Mar 2, 2017 at 11:02 AM, Garrett Honeycutt <
> g...@garretthoneycutt.com> wrote:
>
>> On 3/2/17 9:58 AM, warron.french wrote:
>> > Hello all,
>> > can someone please advise me on a proper set of syntax (a file to look
>> > at) for an example to follow to solve the following challenge:
>> >
>> >  1. I have 2 deliver 2 *.rpm files that are not in a YUM repository, so
>> > I dropped them into the files directory of my module path.
>> >  2. I need to be able to execute each of them either together, or
>> > _A.rpm before B.rpm_
>> >  3. __Then execute a shell script that requires the 2 RPMs to be in
>> > place before that happens.
>> >
>> > I am starting to get into slightly more complicated modules, instead of
>> > simply delivering basic ASCII text files using  *content =>
>> > template('modulename/some.erb')*.
>> >
>> > I just need an example that is know to provide proper execution, proper
>> > syntax, and something I can learn from correctly.  I am still building
>> > the foundation of my understanding, so troubleshooting someone else's
>> > code isn't going to be too good for my development yet.
>> >
>> >
>> > Thank you in advance,
>> > --
>> > Warron French
>> >
>>
>> Hi Warron,
>>
>> What you want to accomplish is a bad idea and you should use a yum repo
>> and definitely not check in binary data with your modules. You could at
>> least store the rpm's somewhere and then download them from that
>> canonical source. Take a look at Artifactory which can help with where
>> to store things such as your random rpm's.
>>
>> Sometimes you have to automate what you have before you build something
>> better. Suggest writing an exec resource that can handle what you are
>> trying to do. The key here is to have two commands. One that checks to
>> see if you are already in the desired state and another to get 

Re: [Puppet Users] Manage delivery and execution of RPMs not in YUM

2017-03-02 Thread Andrew Grimberg
Repositories should _never_ contain binary objects. The only exception I
ever allow my developers is graphical assets related to websites.

On 03/02/2017 08:48 AM, warron.french wrote:
> Garrett, thanks.
> 
> So, to clarify for myself in terms of a BEST practice are you declaring
> "don't deliver RPMs as part of the payload of the Puppet Module?"  *I
> just got that part working.  :-/*  I don't mind correction, but I don't
> want to go down the rabbit hole.
> 
> Secondly, using an exec resource to implement the RPMs?
> 
> Perhaps something like this...
> 
> exec { 'install_cctk_rpms':
>  creates => '/opt/dell/dcc/cctk',
>  command => 'yum localinstall -y A.rpm B.rpm',
>  returns => '0',
> }
> 
> I have never written an exec resource declaration before.  Can you tell
> me if the exec syntax is correct, and that it is also what you meant for
> having to commands; I can combine them into a single *yum localinstall
> -y  *command correct?
> 
> Thanks Garrett.
> 
> 
> --
> Warron French
> 
> 
> On Thu, Mar 2, 2017 at 11:02 AM, Garrett Honeycutt
> > wrote:
> 
> On 3/2/17 9:58 AM, warron.french wrote:
> > Hello all,
> > can someone please advise me on a proper set of syntax (a file to look
> > at) for an example to follow to solve the following challenge:
> >
> >  1. I have 2 deliver 2 *.rpm files that are not in a YUM
> repository, so
> > I dropped them into the files directory of my module path.
> >  2. I need to be able to execute each of them either together, or
> > _A.rpm before B.rpm_
> >  3. __Then execute a shell script that requires the 2 RPMs to be in
> > place before that happens.
> >
> > I am starting to get into slightly more complicated modules, instead of
> > simply delivering basic ASCII text files using  *content =>
> > template('modulename/some.erb')*.
> >
> > I just need an example that is know to provide proper execution, proper
> > syntax, and something I can learn from correctly.  I am still building
> > the foundation of my understanding, so troubleshooting someone else's
> > code isn't going to be too good for my development yet.
> >
> >
> > Thank you in advance,
> > --
> > Warron French
> >
> 
> Hi Warron,
> 
> What you want to accomplish is a bad idea and you should use a yum repo
> and definitely not check in binary data with your modules. You could at
> least store the rpm's somewhere and then download them from that
> canonical source. Take a look at Artifactory which can help with where
> to store things such as your random rpm's.
> 
> Sometimes you have to automate what you have before you build something
> better. Suggest writing an exec resource that can handle what you are
> trying to do. The key here is to have two commands. One that checks to
> see if you are already in the desired state and another to get you to
> the desired state. Figure that out without Puppet and once you have
> those commands, you can write a manifest.
> 
> Best regards,
> -g
> 
> --
> Garrett Honeycutt
> @learnpuppet
> Puppet Training with LearnPuppet.com
> Mobile: +1.206.414.8658 
> 
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to puppet-users+unsubscr...@googlegroups.com
> .
> To view this discussion on the web visit
> 
> https://groups.google.com/d/msgid/puppet-users/4fc045bb-3e5f-f9d4-88a6-688ca3e3436b%40garretthoneycutt.com
> 
> .
> For more options, visit https://groups.google.com/d/optout
> .
> 
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to puppet-users+unsubscr...@googlegroups.com
> .
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CAJdJdQkCQJ%2BXE2th_OLyu7%2BZyJDROfyht9UC906_JXRn%3D0Q7Dg%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 

Re: [Puppet Users] Manage delivery and execution of RPMs not in YUM

2017-03-02 Thread warron.french
Garrett, thanks.

So, to clarify for myself in terms of a BEST practice are you declaring
"don't deliver RPMs as part of the payload of the Puppet Module?"  *I just
got that part working.  :-/*  I don't mind correction, but I don't want to
go down the rabbit hole.

Secondly, using an exec resource to implement the RPMs?

Perhaps something like this...

exec { 'install_cctk_rpms':
 creates => '/opt/dell/dcc/cctk',
 command => 'yum localinstall -y A.rpm B.rpm',
 returns => '0',
}

I have never written an exec resource declaration before.  Can you tell me
if the exec syntax is correct, and that it is also what you meant for
having to commands; I can combine them into a single *yum localinstall
-y  *command
correct?

Thanks Garrett.


--
Warron French


On Thu, Mar 2, 2017 at 11:02 AM, Garrett Honeycutt 
wrote:

> On 3/2/17 9:58 AM, warron.french wrote:
> > Hello all,
> > can someone please advise me on a proper set of syntax (a file to look
> > at) for an example to follow to solve the following challenge:
> >
> >  1. I have 2 deliver 2 *.rpm files that are not in a YUM repository, so
> > I dropped them into the files directory of my module path.
> >  2. I need to be able to execute each of them either together, or
> > _A.rpm before B.rpm_
> >  3. __Then execute a shell script that requires the 2 RPMs to be in
> > place before that happens.
> >
> > I am starting to get into slightly more complicated modules, instead of
> > simply delivering basic ASCII text files using  *content =>
> > template('modulename/some.erb')*.
> >
> > I just need an example that is know to provide proper execution, proper
> > syntax, and something I can learn from correctly.  I am still building
> > the foundation of my understanding, so troubleshooting someone else's
> > code isn't going to be too good for my development yet.
> >
> >
> > Thank you in advance,
> > --
> > Warron French
> >
>
> Hi Warron,
>
> What you want to accomplish is a bad idea and you should use a yum repo
> and definitely not check in binary data with your modules. You could at
> least store the rpm's somewhere and then download them from that
> canonical source. Take a look at Artifactory which can help with where
> to store things such as your random rpm's.
>
> Sometimes you have to automate what you have before you build something
> better. Suggest writing an exec resource that can handle what you are
> trying to do. The key here is to have two commands. One that checks to
> see if you are already in the desired state and another to get you to
> the desired state. Figure that out without Puppet and once you have
> those commands, you can write a manifest.
>
> Best regards,
> -g
>
> --
> Garrett Honeycutt
> @learnpuppet
> Puppet Training with LearnPuppet.com
> Mobile: +1.206.414.8658
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/puppet-users/4fc045bb-3e5f-f9d4-88a6-688ca3e3436b%
> 40garretthoneycutt.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAJdJdQkCQJ%2BXE2th_OLyu7%2BZyJDROfyht9UC906_JXRn%3D0Q7Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: What's the best way to deal with multiple OS's

2017-03-02 Thread Garrett Honeycutt
On 2/24/17 5:30 PM, Nate B wrote:
>   // , Is there a better way to deal with this in later versions of Puppet?
> 
> I lean toward using different manifests for different operating system
> variations, but like the original poster says, no matter how one
> organizes the logic, it still gets tedious.
> 
> Puppet 4.9 doesn't even seem to have in line selectors:
> https://docs.puppet.com/puppet/latest/lang_summary.html#selectors
> 
> https://duckduckgo.com/?q=inurl%3Ahttps%3A%2F%2Fdocs.puppet.com%2Fpuppet%2Flatest%2F+%22selectors%22=h_=web
> 
> Should I consider having a different module for each OS, say, a module
> named appcerts_pkgs_windows and a module named appcerts_pkgs_linux, with
> different manifests for the variations under each?
> 
> The whole point of Puppet is to manage multiple operating systems and
> variations from a single source. It would surprise me if they didn't
> have a solution, but I just can't seem to find it.
> 
> On Friday, September 30, 2011 at 11:33:50 AM UTC-7, Jeff Falgout wrote:
> 
> We're in the situation of dealing with multiple operating systems
> (and will likely add another) and I'm quickly realizing that
> building logic in the manifest to deal with the differences in Red
> Hat i386 vs Red Hat x86_64 vs SuSE i586 vs SuSE x86_64 vs Mac is
> getting tedious. For instance, in the sshd_config:
> 
> SLES i586 has the sftp-server binary in a different path than the
> x86_64 version and it's different than RHEL - so I end up with logic
> as such:
> 
> # Set the SFTP Path
> if $lsbdistid == 'SUSE LINUX' {
>if $architecture == 'x86_64' {
>   $sftppath = '/usr/lib64/ssh/sftp-server'
>} else {
>   $sftppath = '/usr/lib/ssh/sftp-server'
>}
> } else {
>$sftppath = "/usr/libexec/openssh/sftp-server"
> }
> 
> 
> Is there a better way to deal with different OS's or is the long and
> winding road of config mgmt?
> 
> Do people do something like:
> 
> include ssh::server::$operatingsystem
> 
> class ssh::server::RedHat {
>   blah
> }
> 
> class ssh::server::SLES {
>   blah
> }
> 
> 
> Different modulepath? Different puppet servers based on OS?
> 
> Cheers,
> 
> Jeff
> 
> -- 

Hi Jeff,

Most of my modules support a bunch of OS's including Debian, EL,
Solaris, Suse and Ubuntu and at different releases. To do this, I have
to encode a lot of default data into the module.

Consider the following pattern. If you do not specify a value for the
package parameter, it will use the default for that osfamily.

  class foo (
$package = undef,
  ) {

case $::osfamily {
  'Debian': { $default_package = 'foo2' }
  'RedHat': { $default_package = 'foo' }
  default: { fail('foo supports EL and Debian osfamilies') }
}

if $package == undef {
  $package_real = $default_package
} else {
  $package_real = $package
}

package { $package_real:
  ensure => 'present',
}
  }

Take a look at my ssh module. It is approved by Puppet and works on 13
different platforms and takes into account the processor type for Suse
as you mentioned above.

https://forge.puppet.com/ghoneycutt/ssh/readme

I tend to use case statements for all of the different platforms and
avoid using subclasses such as foo::debian and foo::redhat.

While I generally opt for putting all configuration into the same
template such as with the ssh module, sometimes the platform differences
are quite different, in which case I use platform specific templates.
For an example of this, check out my Puppet approved module for inittab.

https://forge.puppet.com/ghoneycutt/inittab

Best regards,
-g


-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/8cfb1168-2d9e-225b-9ef8-d7066e36ec4d%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Master and Custom Facts

2017-03-02 Thread warron.french
Awesome, thank you  very much for your patience and tutoring me.  I really
do appreciate it.

--
Warron French


On Wed, Mar 1, 2017 at 8:33 PM, Rob Nelson  wrote:

> Yeah, a 'profile::base' that does nothing or just updates the motd if you
> want a very simple manifest would do just fine.
>
> On Wed, Mar 1, 2017 at 2:09 PM warron.french 
> wrote:
>
>> Hi Rob, thanks.
>>
>> A single run?  Runs don't need to change anything, but they do need to
>> complete and send the report?  How do I accomplish that?
>>
>> Are you saying an empty class would do?
>>
>> --
>> Warron French
>>
>>
>> On Tue, Feb 28, 2017 at 10:30 PM, Rob Nelson  wrote:
>>
>> If you deploy the custom fact, the agent would need to perform a single
>> run and then send the report to puppetdb. Afterward, it would be visible in
>> the admin console (assuming you mean PE console here) in all the usual
>> places, such as in the node details and filtering by fact valued.
>>
>> The runs don't need to change anything, but they do need to complete and
>> send the report; if this doesn't happen every 14 days by default, it will
>> get purged from puppetdb and of course no longer show up.
>>
>> On Tue, Feb 28, 2017 at 6:48 PM warron.french 
>> wrote:
>>
>> Can I write a custom fact and see its value returned in the Admin
>> Console?  Or does it only allow for the execution of Puppet Code based on
>> conditionals and criteria meeting expectations?
>>
>> If the answer is yes to the first question, can I simply write the Custom
>> Fact, without necessarily making any changes to a Puppet Agent Node; so
>> that I can assess certain details about my network that aren't *native
>> Puppet Facts*?
>>
>> My employer is creating systems, and we are "stamping" them with a text
>> file under /etc/ and we want to be able to grab the content of the file WE
>> CREATE under /etc to determine if machine A, BZ are part of Baseline1
>> or Baseline2; for example.
>>
>> Thanks in advance,
>> --
>> Warron French
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/puppet-users/CAJdJdQ%3DwmGU_uUs9cfpq0SwjCtahdxXDN-
>> pW%3DXoKEyiJ-TSGow%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> Rob Nelson
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com.
>>
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/puppet-users/CAC76iT-W534UgJezB4RN3DOn_-Tb_
>> fMA7SNozqCrjAF4f8bUGA%40mail.gmail.com
>> 
>> .
>>
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/puppet-users/CAJdJdQ%3DneD2UdG3ThgZkj2vwR6Yja-
>> qavCRPVL4iqEcvX6oJpQ%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> Rob Nelson
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/puppet-users/CAC76iT_FjtVyet9HEfNK25OaQRsNjBRy46rJ0
> Csq45SFLy-76w%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Re: [Puppet Users] Manage delivery and execution of RPMs not in YUM

2017-03-02 Thread Garrett Honeycutt
On 3/2/17 9:58 AM, warron.french wrote:
> Hello all,
> can someone please advise me on a proper set of syntax (a file to look
> at) for an example to follow to solve the following challenge:
> 
>  1. I have 2 deliver 2 *.rpm files that are not in a YUM repository, so
> I dropped them into the files directory of my module path.
>  2. I need to be able to execute each of them either together, or   
> _A.rpm before B.rpm_
>  3. __Then execute a shell script that requires the 2 RPMs to be in
> place before that happens.
> 
> I am starting to get into slightly more complicated modules, instead of
> simply delivering basic ASCII text files using  *content =>
> template('modulename/some.erb')*.
> 
> I just need an example that is know to provide proper execution, proper
> syntax, and something I can learn from correctly.  I am still building
> the foundation of my understanding, so troubleshooting someone else's
> code isn't going to be too good for my development yet.
> 
> 
> Thank you in advance,
> --
> Warron French
> 

Hi Warron,

What you want to accomplish is a bad idea and you should use a yum repo
and definitely not check in binary data with your modules. You could at
least store the rpm's somewhere and then download them from that
canonical source. Take a look at Artifactory which can help with where
to store things such as your random rpm's.

Sometimes you have to automate what you have before you build something
better. Suggest writing an exec resource that can handle what you are
trying to do. The key here is to have two commands. One that checks to
see if you are already in the desired state and another to get you to
the desired state. Figure that out without Puppet and once you have
those commands, you can write a manifest.

Best regards,
-g

-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/4fc045bb-3e5f-f9d4-88a6-688ca3e3436b%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Manage delivery and execution of RPMs not in YUM

2017-03-02 Thread warron.french
Hello all,
can someone please advise me on a proper set of syntax (a file to look at)
for an example to follow to solve the following challenge:


   1. I have 2 deliver 2 *.rpm files that are not in a YUM repository, so I
   dropped them into the files directory of my module path.
   2. I need to be able to execute each of them either together, or*A.rpm
   before B.rpm*
   3. Then execute a shell script that requires the 2 RPMs to be in place
   before that happens.

I am starting to get into slightly more complicated modules, instead of
simply delivering basic ASCII text files using  *content =>
template('modulename/some.erb')*.

I just need an example that is know to provide proper execution, proper
syntax, and something I can learn from correctly.  I am still building the
foundation of my understanding, so troubleshooting someone else's code
isn't going to be too good for my development yet.


Thank you in advance,
--
Warron French

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAJdJdQkTwF4HTh8r54HZ_aNittaLZ7UMEKEZTEgpaJ9vU8R5mw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] build version tag?

2017-03-02 Thread Rob Nelson
You can adjust the config_version value in puppet.conf (
https://docs.puppet.com/puppet/latest/configuration.html#configversion) to
spit out the git hash. See "Per-environment config_version" at
http://garylarizza.com/blog/2014/08/31/r10k-plus-directory-environments/
for some detail on it and an example of using the git hash instead of epoch
time.


Rob Nelson
rnels...@gmail.com

On Wed, Mar 1, 2017 at 11:45 AM, Jason McMahan 
wrote:

> I am sorry i do not quite catch your meaning Rob.
> Could you please explain?
>
> Thank you
>
> On Tuesday, February 28, 2017 at 9:26:01 PM UTC-6, Rob Nelson wrote:
>>
>> If you're using a control repo, you can change the catalog version number
>> from seconds since epoch to git commit hash, which should allow you to
>> reconstitute all the modules in use at that time if you pin all external
>> modules in your Puppetfile (included would already be part of that hash).
>> --
>> Rob Nelson
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/puppet-users/5232619f-fbfa-4047-84eb-3a80d5114088%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAC76iT_0Sj6TLrEaV-_jALuYZ4%2Bf_JSQy73XyKbdMaa1Ga_qpA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppetlabs-sqlserver

2017-03-02 Thread Martin Alfke
I can not test the sqlserver module as I don’t have PE with a valid license at 
hand right now.
Maybe you want to contact PE support:
https://puppet.com/support-services/customer-support?_ga=1.240191875.1487149708.1460034961

> On 02 Mar 2017, at 13:40, Ryan Vande  wrote:
> 
> It says to include in your manifest 
> 
> "sqlserver_instance{ 'MSSQLSERVER':
> features=> ['SQL'],
> source  => 'E:/',
> sql_sysadmin_accounts   => ['myuser'],
> }
> 
> which I did , the error I got back was " Evaluation Error: Resource type not 
> found: Mssql_instance"
> 
> What I did was place the following code in site.pp under the node definition 
> for winsql.attlocal.net :
> sqlserver_instance{ 'MSSQLSERVER':
> features=> ['SQL'],
> source  => 'E:/',
> sql_sysadmin_accounts   => ['myuser'],
> }
> 
> Either way, The only sql classes I see when trying to designate the 
> appropriate classes to the classification in the console is postgressql 
> 
> Doesn't seem this class is loading 
> 
> Im new so please correct me where im wrong 
> 
> 
> 
> On Thursday, March 2, 2017 at 6:59:19 AM UTC-5, Martin Alfke wrote:
> There is not type mssql_instance in the module: 
> https://forge.puppet.com/puppetlabs/sqlserver/types 
> 
> Did you follow the setup description? 
> https://forge.puppet.com/puppetlabs/sqlserver/readme#setup 
> 
> > On 02 Mar 2017, at 12:49, Ryan Vande  wrote: 
> > 
> > Here is my puppet module list --all 
> > /etc/puppetlabs/code/environments/production/site 
> > ├── puppetlabs-ntp (v6.0.0) 
> > ├── puppetlabs-sqlserver (v1.1.5) 
> > └── puppetlabs-stdlib (v4.15.0) 
> > /etc/puppetlabs/code/environments/production/modules (no modules installed) 
> > /etc/puppetlabs/code/modules (no modules installed) 
> > /opt/puppetlabs/puppet/modules 
> > ├── puppetlabs-pe_accounts (v2.0.2-6-gd2f698c) 
> > ├── puppetlabs-pe_concat (v1.1.2-7-g77ec55b) 
> > ├── puppetlabs-pe_console_prune (v0.1.1-9-gfc256c0) 
> > ├── puppetlabs-pe_hocon (v2016.2.0) 
> > ├── puppetlabs-pe_infrastructure (v2016.4.0) 
> > ├── puppetlabs-pe_inifile (v2016.2.1-rc0) 
> > ├── puppetlabs-pe_java_ks (v1.2.4-37-g2d86015) 
> > ├── puppetlabs-pe_nginx (v2016.4.0) 
> > ├── puppetlabs-pe_postgresql (v2016.2.0) 
> > ├── puppetlabs-pe_puppet_authorization (v2016.2.0-rc1) 
> > ├── puppetlabs-pe_r10k (v2016.2.0) 
> > ├── puppetlabs-pe_razor (v1.0.0) 
> > ├── puppetlabs-pe_repo (v2016.4.0) 
> > ├── puppetlabs-pe_staging (v2015.3.0) 
> > └── puppetlabs-puppet_enterprise (v2016.4.1) 
> > 
> > 
> > The modules in bold are what im trying to work with. 
> > 
> > I cannot get the sqlserver module/classes to identify. I cannot work with 
> > sqlserver, says can't find the module. 
> > 
> > I can work with puppetlabs-ntp with no problem. 
> > 
> > Does anyone have experience with puppetlabs-sqlserver that I may speak 
> > with. 
> > 
> > My goal is to install sqlserver on my windows 2012 server, which is a 
> > puppet node for the record. For the life of me this module will not load 
> > and calling the class ends with : 
> > 
> > Error: Could not retrieve catalog from remote server: Error 500 on SERVER: 
> > Server Error: Evaluation Error: Resource type not found: Mssql_instance at 
> > /etc/puppetlabs/code/environments/production/manifests/site.pp:45:17 on 
> > node winsql.attlocal.net
> >
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google Groups 
> > "Puppet Users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to puppet-users...@googlegroups.com. 
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/puppet-users/ecc27be9-ea78-4c90-bf6e-51bacc5c4ad8%40googlegroups.com.
> >  
> > For more options, visit https://groups.google.com/d/optout. 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/a882181d-f52c-41b0-9c42-446cb4932d36%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/FCDDFDBA-C35F-4BB7-8F23-FA2E84370789%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppetlabs-sqlserver

2017-03-02 Thread Ryan Vande
It says to include in your manifest 

"sqlserver_instance{ 'MSSQLSERVER':
features=> ['SQL'],
source  => 'E:/',
sql_sysadmin_accounts   => ['myuser'],
}

which I did , the error I got back was " Evaluation Error: Resource type 
not found: Mssql_instance"

What I did was place the following code in site.pp under the node 
definition for winsql.attlocal.net :
sqlserver_instance{ 'MSSQLSERVER':
features=> ['SQL'],
source  => 'E:/',
sql_sysadmin_accounts   => ['myuser'],
}

Either way, The only sql classes I see when trying to designate the 
appropriate classes to the classification in the console is postgressql 

Doesn't seem this class is loading 

Im new so please correct me where im wrong 



On Thursday, March 2, 2017 at 6:59:19 AM UTC-5, Martin Alfke wrote:
>
> There is not type mssql_instance in the module: 
> https://forge.puppet.com/puppetlabs/sqlserver/types 
>
> Did you follow the setup description? 
> https://forge.puppet.com/puppetlabs/sqlserver/readme#setup 
>
> > On 02 Mar 2017, at 12:49, Ryan Vande  
> wrote: 
> > 
> > Here is my puppet module list --all 
> > /etc/puppetlabs/code/environments/production/site 
> > ├── puppetlabs-ntp (v6.0.0) 
> > ├── puppetlabs-sqlserver (v1.1.5) 
> > └── puppetlabs-stdlib (v4.15.0) 
> > /etc/puppetlabs/code/environments/production/modules (no modules 
> installed) 
> > /etc/puppetlabs/code/modules (no modules installed) 
> > /opt/puppetlabs/puppet/modules 
> > ├── puppetlabs-pe_accounts (v2.0.2-6-gd2f698c) 
> > ├── puppetlabs-pe_concat (v1.1.2-7-g77ec55b) 
> > ├── puppetlabs-pe_console_prune (v0.1.1-9-gfc256c0) 
> > ├── puppetlabs-pe_hocon (v2016.2.0) 
> > ├── puppetlabs-pe_infrastructure (v2016.4.0) 
> > ├── puppetlabs-pe_inifile (v2016.2.1-rc0) 
> > ├── puppetlabs-pe_java_ks (v1.2.4-37-g2d86015) 
> > ├── puppetlabs-pe_nginx (v2016.4.0) 
> > ├── puppetlabs-pe_postgresql (v2016.2.0) 
> > ├── puppetlabs-pe_puppet_authorization (v2016.2.0-rc1) 
> > ├── puppetlabs-pe_r10k (v2016.2.0) 
> > ├── puppetlabs-pe_razor (v1.0.0) 
> > ├── puppetlabs-pe_repo (v2016.4.0) 
> > ├── puppetlabs-pe_staging (v2015.3.0) 
> > └── puppetlabs-puppet_enterprise (v2016.4.1) 
> > 
> > 
> > The modules in bold are what im trying to work with. 
> > 
> > I cannot get the sqlserver module/classes to identify. I cannot work 
> with sqlserver, says can't find the module. 
> > 
> > I can work with puppetlabs-ntp with no problem. 
> > 
> > Does anyone have experience with puppetlabs-sqlserver that I may speak 
> with. 
> > 
> > My goal is to install sqlserver on my windows 2012 server, which is a 
> puppet node for the record. For the life of me this module will not load 
> and calling the class ends with : 
> > 
> > Error: Could not retrieve catalog from remote server: Error 500 on 
> SERVER: Server Error: Evaluation Error: Resource type not found: 
> Mssql_instance at 
> /etc/puppetlabs/code/environments/production/manifests/site.pp:45:17 on 
> node winsql.attlocal.net 
>   
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Puppet Users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to puppet-users...@googlegroups.com . 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/ecc27be9-ea78-4c90-bf6e-51bacc5c4ad8%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/a882181d-f52c-41b0-9c42-446cb4932d36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppetlabs-sqlserver

2017-03-02 Thread Martin Alfke
There is not type mssql_instance in the module:
https://forge.puppet.com/puppetlabs/sqlserver/types

Did you follow the setup description?
https://forge.puppet.com/puppetlabs/sqlserver/readme#setup

> On 02 Mar 2017, at 12:49, Ryan Vande  wrote:
> 
> Here is my puppet module list --all
> /etc/puppetlabs/code/environments/production/site
> ├── puppetlabs-ntp (v6.0.0)
> ├── puppetlabs-sqlserver (v1.1.5)
> └── puppetlabs-stdlib (v4.15.0)
> /etc/puppetlabs/code/environments/production/modules (no modules installed)
> /etc/puppetlabs/code/modules (no modules installed)
> /opt/puppetlabs/puppet/modules
> ├── puppetlabs-pe_accounts (v2.0.2-6-gd2f698c)
> ├── puppetlabs-pe_concat (v1.1.2-7-g77ec55b)
> ├── puppetlabs-pe_console_prune (v0.1.1-9-gfc256c0)
> ├── puppetlabs-pe_hocon (v2016.2.0)
> ├── puppetlabs-pe_infrastructure (v2016.4.0)
> ├── puppetlabs-pe_inifile (v2016.2.1-rc0)
> ├── puppetlabs-pe_java_ks (v1.2.4-37-g2d86015)
> ├── puppetlabs-pe_nginx (v2016.4.0)
> ├── puppetlabs-pe_postgresql (v2016.2.0)
> ├── puppetlabs-pe_puppet_authorization (v2016.2.0-rc1)
> ├── puppetlabs-pe_r10k (v2016.2.0)
> ├── puppetlabs-pe_razor (v1.0.0)
> ├── puppetlabs-pe_repo (v2016.4.0)
> ├── puppetlabs-pe_staging (v2015.3.0)
> └── puppetlabs-puppet_enterprise (v2016.4.1)
> 
> 
> The modules in bold are what im trying to work with.
> 
> I cannot get the sqlserver module/classes to identify. I cannot work with 
> sqlserver, says can't find the module.
> 
> I can work with puppetlabs-ntp with no problem.
> 
> Does anyone have experience with puppetlabs-sqlserver that I may speak with.
> 
> My goal is to install sqlserver on my windows 2012 server, which is a puppet 
> node for the record. For the life of me this module will not load and calling 
> the class ends with :
> 
> Error: Could not retrieve catalog from remote server: Error 500 on SERVER: 
> Server Error: Evaluation Error: Resource type not found: Mssql_instance at 
> /etc/puppetlabs/code/environments/production/manifests/site.pp:45:17 on node 
> winsql.attlocal.net   
>
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/ecc27be9-ea78-4c90-bf6e-51bacc5c4ad8%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/BE3E5BB4-3DD5-46D5-9E41-FA8CD4B097E4%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppetlabs-sqlserver

2017-03-02 Thread Ryan Vande
Here is my puppet module list --all
/etc/puppetlabs/code/environments/production/site
├── puppetlabs-ntp (v6.0.0)
├──* puppetlabs-sqlserver (v1.1.5)*
*└── puppetlabs-stdlib (v4.15.0)*
/etc/puppetlabs/code/environments/production/modules (no modules installed)
/etc/puppetlabs/code/modules (no modules installed)
/opt/puppetlabs/puppet/modules
├── puppetlabs-pe_accounts (v2.0.2-6-gd2f698c)
├── puppetlabs-pe_concat (v1.1.2-7-g77ec55b)
├── puppetlabs-pe_console_prune (v0.1.1-9-gfc256c0)
├── puppetlabs-pe_hocon (v2016.2.0)
├── puppetlabs-pe_infrastructure (v2016.4.0)
├── puppetlabs-pe_inifile (v2016.2.1-rc0)
├── puppetlabs-pe_java_ks (v1.2.4-37-g2d86015)
├── puppetlabs-pe_nginx (v2016.4.0)
├── puppetlabs-pe_postgresql (v2016.2.0)
├── puppetlabs-pe_puppet_authorization (v2016.2.0-rc1)
├── puppetlabs-pe_r10k (v2016.2.0)
├── puppetlabs-pe_razor (v1.0.0)
├── puppetlabs-pe_repo (v2016.4.0)
├── puppetlabs-pe_staging (v2015.3.0)
└── puppetlabs-puppet_enterprise (v2016.4.1)


The modules in bold are what im trying to work with.

I cannot get the sqlserver module/classes to identify. I cannot work with 
sqlserver, says can't find the module.

I can work with puppetlabs-ntp with no problem.

Does anyone have experience with puppetlabs-sqlserver that I may speak with.

My goal is to install sqlserver on my windows 2012 server, which is a 
puppet node for the record. For the life of me this module will not load 
and calling the class ends with :

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: 
Server Error: Evaluation Error: Resource type not found: Mssql_instance at 
/etc/puppetlabs/code/environments/production/manifests/site.pp:45:17 on 
node winsql.attlocal.net   
   

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ecc27be9-ea78-4c90-bf6e-51bacc5c4ad8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Facter error: empty packages.json

2017-03-02 Thread Adam Mercer
Hi

I've recently been using puppet-agent-1.9.2 on an Ubuntu-14.04 machine
and whenever I run puppet agent I receive the following error:

Error: Facter: error while processing
"/opt/puppetlabs/facter/facts.d/packages.json" for external facts: The
document is empty.

The file it refers to is indeed empty, apart from the above everything
seems to work correctly so I'm not too concerned but I'd like to
understand why I'm getting this error.

We have other machines running, Debian 7, Debian 8, Scientific Linux
7, and Ubuntu 16.04 and none of these exhibit this problem. Has anyone
seen something like this before ot have any suggestions on where to
start debugging this?

Cheers

Adam

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2Bmfgz0ZOsGH%2Bhks81_jmy65w_DbrEWpFvfa8vY8Oqm6qJCHrg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.