Puppet Module Writing - understanding clearly package dependency resolution

31 views
Skip to first unread message

Warron French

unread,
Nov 28, 2015, 10:54:59 PM11/28/15
to Puppet Users
Hello, I am working on writing my first puppet module.  I am pretty skilled in writing complex shell (bash, ksh, sh) scripts so I have some questions in general about writing a thorough puppet module.

I want to write a single puppet module to support installation, configuration and service management of system audit (auditd for example) on different operating systems.  Specifically, Solaris 10 {x86|SPARC} and CentOS {x86_64}.

I know that if I have a yum repo (for CentOS) and run the command yum update audit  it will then update all of the dependencies automatically.

So, my question is, do I need to provide syntax like the following:

  package {'audit':
    ensure  => latest,
    name    => "${auditpkg}",
    require => Package['audit-libs']
  }

Or will the CentOS puppet agent node simply run the yum installation/update automatically and update the audit-libs package; without any concerns?

Also, and this probably might not be appropriate for this particular email/post, but I would like to know, since Solaris 10 does not work with repositories (correct me if I am wrong); do I need to skip the idea of writing this module in support of Solaris 10 (even though my workplace is still using it).  I am not looking for opinions on this matter, I am looking to know if there is a way to get puppet to update Solaris 10 systems with puppet modules against software packages?

Gareth Rushgrove

unread,
Nov 29, 2015, 7:49:20 AM11/29/15
to puppet...@googlegroups.com
On 29 November 2015 at 03:54, Warron French <warron...@gmail.com> wrote:
> Hello, I am working on writing my first puppet module. I am pretty skilled
> in writing complex shell (bash, ksh, sh) scripts so I have some questions in
> general about writing a thorough puppet module.
>
> I want to write a single puppet module to support installation,
> configuration and service management of system audit (auditd for example) on
> different operating systems. Specifically, Solaris 10 {x86|SPARC} and
> CentOS {x86_64}.
>
> I know that if I have a yum repo (for CentOS) and run the command yum update
> audit it will then update all of the dependencies automatically.
>
> So, my question is, do I need to provide syntax like the following:
>
> package {'audit':
> ensure => latest,
> name => "${auditpkg}",
> require => Package['audit-libs']
> }
>
> Or will the CentOS puppet agent node simply run the yum installation/update
> automatically and update the audit-libs package; without any concerns?
>

This all depends on the package provider under the hood. In this case
it sounds like that's Yum. So when Puppet runs here it will actually
run Yum to install or update the package as required, in order to
match the model you've described that the audit package should be the
latest version. If that package automatically updates the audit-libs
package (or other packages) that will happen too.

> Also, and this probably might not be appropriate for this particular
> email/post, but I would like to know, since Solaris 10 does not work with
> repositories (correct me if I am wrong); do I need to skip the idea of
> writing this module in support of Solaris 10 (even though my workplace is
> still using it). I am not looking for opinions on this matter, I am looking
> to know if there is a way to get puppet to update Solaris 10 systems with
> puppet modules against software packages?
>

It depends here if you're using a package manager for Solaris already,
or if you're open to using one. The difference being there are
several, from memory non of which are standard, depending on your
Solaris variant you're running.

A quick check says the Puppet package resources supports pkgutil, sun,
sunfreeware and blastwave which all target Solaris.

You can find the details here:
https://docs.puppetlabs.com/references/latest/type.html#package-providers

Gareth


> --
> 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/c4033b69-903f-4c25-8f8a-db46e049aca2%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Gareth Rushgrove
@garethr

devopsweekly.com
morethanseven.net
garethrushgrove.com

warron.french

unread,
Nov 29, 2015, 1:56:32 PM11/29/15
to puppet...@googlegroups.com
Thank you Gareth.  What you state is what I was thinking.  It looks like for me Solaris 10 isn't going to have an easy option for upgrading packages (and their dependencies) considering the environment in which I work.



--------------------------
Warron French


Reply all
Reply to author
Forward
0 new messages