Sidedoor - Puppet Module

30 views
Skip to first unread message

Warron French

unread,
Jun 1, 2016, 11:22:10 PM6/1/16
to puppet...@googlegroups.com
I have created, a Puppet Module using PE-2015.2.

The module is called Sidedoor (as opposed to backdoor) and the intent is to do the following (as I am evolving it):
  1. Create a system-group with GID=300, and ensure it is in place,
  2. Create a user (mine for example) with starting UID=(300 + serial of userID {starting at 1...n})

Here is my current manifests/init.pp (and I am not ready for senior level programming input/best practices yet), sidedoor/manifests/init.pp:
# Class: sidedoor
# ===========================
#
#
#
class sidedoor {

#  Create a Group for the localusers to be added to.

    group { 'sidedoor':
      ensure => 'present',
      system => 'true',
      gid    => '300',
    }
    
    user { 'wsf29221':
      ensure           => 'present',
      forcelocal       => 'true',
      password         => '$6$Bw0KWK673BvjQU/W$WAiTDgk7EN3sD02xUaMngmIB02qQ/G4sRTeP6ySZToWylblcawuekIO4WSUgVMllbjrXP2QOLH96jTfA1xdz1/',
      password_max_age => '180',
      password_min_age => '0',
      gid              => '300',
      uid              => '301',
      comment          => 'Sidedoor_Acct-Warron',
      managehome       => 'true',
      home             => '/home/wsf29221',
      shell            => '/bin/bash',
    }

    file { '/home/wsf29221':
      ensure   => 'directory',
      owner    => '301',
      group    => '300',
      mode     => '0750',
      source   => [ "puppet:///modules/sidedoor/files/wsf29221", ],
    }

}

I believe I am not getting the file resource built correctly (yet).  The code above doesn't properly work on a Solaris 10 x86 VM that I have at all; it doesn't even try for some reason, but more importantly, it doesn't create the homedir for the user's account, even though the managehome attribute is being set.

I have this module written (and tested from) /etc/puppetlabs/code/environments/production/modules, and I purposely created the wsf29221 user account and it's home directory with matching user-attributes to generate a /home/wsf29221 directory; then I copied that subdirectory into /etc/puppetlabs/code/environments/production/modules/sidedoor/files/. 

Can someone please help me get the directory creation/population portion of this module working?

I am trying to learn how to write modules; not necessarily best practices yet.

Thanks,
Warron


Warron French

unread,
Jun 2, 2016, 10:24:19 AM6/2/16
to Puppet Users
Is there a limit to the number of questions that I can post to Google Groups or this list... in a single day?

Matt Zagrabelny

unread,
Jun 2, 2016, 11:37:18 AM6/2/16
to puppet...@googlegroups.com
Hi!

On Thu, Jun 2, 2016 at 9:24 AM, Warron French <warron...@gmail.com> wrote:
> Is there a limit to the number of questions that I can post to Google Groups
> or this list... in a single day?

Nope. :)

-m

warron.french

unread,
Jun 2, 2016, 11:40:08 AM6/2/16
to puppet...@googlegroups.com
Thanks Matt.

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



-m

--
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/CAOLfK3X%3DBE3f0%2BXbbAFdFixXC%3DtVdg2SQ_P_Pqx3VX8nLFXFBQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages