<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Puppet on ZachFi</title>
    <link>https://zach.fi/tags/puppet/</link>
    <description>Recent content in Puppet on ZachFi</description>
    <image>
      <title>ZachFi</title>
      <url>https://zach.fi/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://zach.fi/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- 0.148.2</generator>
    <language>en</language>
    <lastBuildDate>Fri, 24 Feb 2017 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://zach.fi/tags/puppet/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Puppet Providers and Unit Testing</title>
      <link>https://zach.fi/2017/02/24/puppet-provider-unit-testing-the-property-hash/</link>
      <pubDate>Fri, 24 Feb 2017 00:00:00 +0000</pubDate>
      <guid>https://zach.fi/2017/02/24/puppet-provider-unit-testing-the-property-hash/</guid>
      <description>&lt;p&gt;Sometimes Puppet providers execute their logic based on the contents of a
&lt;code&gt;@property_hash&lt;/code&gt;, which is just a representation of a resource&amp;rsquo;s actual state.
Its easy enough to test a provider for the basics, but populating the
&lt;code&gt;@property_hash&lt;/code&gt; for a unit test has always been something of a chore, and
often gets skipped, leaving large portions of provider code untested.  I wish
I&amp;rsquo;d understood this years ago, but now that I&amp;rsquo;ve got my head round it, its
pretty simple.&lt;/p&gt;</description>
    </item>
    <item>
      <title>User Management Patterns</title>
      <link>https://zach.fi/2016/03/26/user-management-patterns/</link>
      <pubDate>Sat, 26 Mar 2016 00:00:00 +0000</pubDate>
      <guid>https://zach.fi/2016/03/26/user-management-patterns/</guid>
      <description>&lt;p&gt;User management can be a bit of a sore subject for some admins, but I&amp;rsquo;ve found
it can really pay off when done correctly, though its not always clear what
that means.  I&amp;rsquo;ve been on both sides of that line in the past, sometimes when
the line moves, and sometimes not.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m a believer that managing the users and groups in your organization
proficiently and with low overhead is important.  It should be done well, if
for no other reason, than to be able to state authoritatively &lt;em&gt;who&lt;/em&gt; should have
access to &lt;em&gt;what&lt;/em&gt; and &lt;em&gt;why&lt;/em&gt;, ideally requiring as little administrative time
as possible once the system is in place.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using LDAP for Puppet classification</title>
      <link>https://zach.fi/posts/puppet-classification-with-ldap/</link>
      <pubDate>Mon, 23 Nov 2015 00:00:00 +0000</pubDate>
      <guid>https://zach.fi/posts/puppet-classification-with-ldap/</guid>
      <description>&lt;p&gt;Over the last year, I&amp;rsquo;ve been slowly moving some of my private Puppet code to
use LDAP as a data source. Through this process, a bit of strategy, some tool
and some schema has emerged I&amp;rsquo;ll share here.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s worth noting that Puppet has had an &lt;a href=&#34;https://docs.puppetlabs.com/guides/ldap_nodes.html&#34;&gt;LDAP Node Classifier&lt;/a&gt;
for quite some time, probably longer than I&amp;rsquo;ve been using Puppet. Though
looking over the documentation, you wouldn&amp;rsquo;t know it, but the most useful bit
of this whole work is that fact that Puppet supports the configuration
variables necessary to make a connection to an LDAP server, &lt;strong&gt;and&lt;/strong&gt; those
variables are available for reference.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Moving My Puppet Master to OpenBSD</title>
      <link>https://zach.fi/2015/02/11/openbsd-puppetmaster/</link>
      <pubDate>Wed, 11 Feb 2015 00:00:00 +0000</pubDate>
      <guid>https://zach.fi/2015/02/11/openbsd-puppetmaster/</guid>
      <description>&lt;p&gt;I recently had some network trouble that isolated a system I use to host
FreeBSD jails to be without network.  The bummer of it is, that I used this
particular system for hosting most of my primary working system.  Things like
CI and Puppet and such all lived in neat little jails, and while all the little
jails and all the little services are still on disk I have no access.  I
suspect the hand-me-down Cisco switch is the culprit, but after years of
service, meh.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Backups with Exported Resources</title>
      <link>https://zach.fi/2014/09/19/backups-with-exported-resources/</link>
      <pubDate>Fri, 19 Sep 2014 00:00:00 +0000</pubDate>
      <guid>https://zach.fi/2014/09/19/backups-with-exported-resources/</guid>
      <description>&lt;p&gt;Failure happens. Its a part of working in technology, and as a techno worker
bee, my job is to ensure that those failures have as little impact on my team
and my company as can be summoned. Part of this (as the business peeps say)
&amp;ldquo;risk mitigation strategy&amp;rdquo;, is backups. Its a part of working in technology
that I want to give as little attention as possible, so its important its low
touch and that its done correctly and is available when I need it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using Puppet with Fabric</title>
      <link>https://zach.fi/2014/08/15/fabric-with-puppet/</link>
      <pubDate>Fri, 15 Aug 2014 00:00:00 +0000</pubDate>
      <guid>https://zach.fi/2014/08/15/fabric-with-puppet/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.fabfile.org/&#34;&gt;Fabric&lt;/a&gt; describes itself as a &amp;ldquo;library and command-line tool for
streamlining the use of SSH for application deployment or systems
administration tasks&amp;rdquo;. To get this work done, Fabric uses what are called
&amp;ldquo;fabfiles&amp;rsquo;, which is just some python stored in a file called &lt;code&gt;fabfile.py&lt;/code&gt;. In
terms of execution, it works a lot like Rake from the Ruby world. You have a
base command, in this case &lt;code&gt;fab&lt;/code&gt; and each task is read from the &lt;code&gt;fabfile.py&lt;/code&gt;
and executed on request. Nothing too earth shattering.&lt;/p&gt;</description>
    </item>
    <item>
      <title>PkgNG on FreeBSD with Puppet</title>
      <link>https://zach.fi/2012/06/30/pkgng-and-puppet/</link>
      <pubDate>Sat, 30 Jun 2012 00:00:00 +0000</pubDate>
      <guid>https://zach.fi/2012/06/30/pkgng-and-puppet/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve recently discovered FreeBSD&amp;rsquo;s new package manager and it looks poised to
become the default package manager soon in FreeBSD 10.&lt;/p&gt;
&lt;p&gt;After watching the &lt;a href=&#34;http://www.youtube.com/watch?v=4Hxq7AHZ27I&#34;&gt;video from BSDCAN&lt;/a&gt; I realized that there was some
pretty serious effort going into the project, but still a bit rough around the
edges.  Some wiki reading later, I was ready to dive in.&lt;/p&gt;
&lt;p&gt;More sources of information seem to be springing up about this new package
manager, and though it does not solve all of the issues surrounding package
management in FreeBSD such as custom options on your ports, it sure is a vast
improvement from previous tools that are available for FreeBSD for my use
cases.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Generate Permutations of Puppet Resources</title>
      <link>https://zach.fi/2012/05/01/puppet-permute-module/</link>
      <pubDate>Tue, 01 May 2012 00:00:00 +0000</pubDate>
      <guid>https://zach.fi/2012/05/01/puppet-permute-module/</guid>
      <description>&lt;p&gt;Here is a Puppet module that is a bit of a meta-module. Its only purpose is to
create other resources by computing the permutations of parameters and
generating new resources. The reason this is useful, is that it allows you to
create lots of similar resources that might have some common and some unique
parameters.&lt;/p&gt;
&lt;p&gt;Consider the following PXE example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-puppet&#34; data-lang=&#34;puppet&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;na&#34;&gt;permute&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;Debian Installers&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&lt;/span&gt;  &lt;span class=&#34;na&#34;&gt;resource&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#39;pxe::installer&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&lt;/span&gt;  &lt;span class=&#34;na&#34;&gt;unique&lt;/span&gt;   &lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;na&#34;&gt;arch&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;amd64&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;i386&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;na&#34;&gt;ver&lt;/span&gt;  &lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;squeeze&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;wheezy&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;na&#34;&gt;os&lt;/span&gt;   &lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;debian&amp;#34;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&lt;/span&gt;  &lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&lt;/span&gt;  &lt;span class=&#34;na&#34;&gt;common&lt;/span&gt;   &lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;k&#34;&gt;file&lt;/span&gt;   &lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;os_&amp;lt;%= os %&amp;gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;na&#34;&gt;kernel&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;images/&amp;lt;%= os %&amp;gt;/&amp;lt;%= ver %&amp;gt;/&amp;lt;%= arch %&amp;gt;/linux&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;na&#34;&gt;append&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;initrd=images/&amp;lt;%= os %&amp;gt;/&amp;lt;%= ver %&amp;gt;/&amp;lt;%= arch %&amp;gt;/initrd.gz text&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&lt;/span&gt;  &lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For every key in the unique parameter hash, a resource will be created for
every combination of things. The keys in the common parameter hash will get
passed through ERB before the resource is created. This allows you to do
interesting things like the above that allow you to determine the values of the
parameters before the resource is generated.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
