<?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>Technical on wegotoeleven</title><link>http://blog.wegotoeleven.xyz/categories/technical/</link><description>Recent content in Technical on wegotoeleven</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Sun, 09 Aug 2026 00:45:52 +0100</lastBuildDate><atom:link href="http://blog.wegotoeleven.xyz/categories/technical/index.xml" rel="self" type="application/rss+xml"/><item><title>Bringing this blog back from the dead</title><link>http://blog.wegotoeleven.xyz/technical/bringing-this-blog-back-from-the-dead/</link><pubDate>Sun, 09 Aug 2026 00:45:52 +0100</pubDate><guid>http://blog.wegotoeleven.xyz/technical/bringing-this-blog-back-from-the-dead/</guid><description>&lt;p&gt;This blog has been dead for years. It wasn&amp;rsquo;t deliberate, more the sort of dead that happens when you keep meaning to sort it out and then don&amp;rsquo;t, for the better part of a decade. At some point I&amp;rsquo;d archived everything into a flat folder of Markdown files and images and left it there. Today I actually finished the job.&lt;/p&gt;
&lt;p&gt;The site now runs on &lt;a href="https://gohugo.io/"&gt;Hugo&lt;/a&gt; with the &lt;a href="https://github.com/adityatelange/hugo-PaperMod"&gt;PaperMod&lt;/a&gt; theme. Hugo takes a folder of Markdown files and turns them into a full static website at build time, and PaperMod is a ready-made visual theme for it, so I didn&amp;rsquo;t have to design anything from scratch, which was exactly the problem that had killed this blog&amp;rsquo;s relaunch more than once before.&lt;/p&gt;</description><content:encoded><![CDATA[<p>This blog has been dead for years. It wasn&rsquo;t deliberate, more the sort of dead that happens when you keep meaning to sort it out and then don&rsquo;t, for the better part of a decade. At some point I&rsquo;d archived everything into a flat folder of Markdown files and images and left it there. Today I actually finished the job.</p>
<p>The site now runs on <a href="https://gohugo.io/">Hugo</a> with the <a href="https://github.com/adityatelange/hugo-PaperMod">PaperMod</a> theme. Hugo takes a folder of Markdown files and turns them into a full static website at build time, and PaperMod is a ready-made visual theme for it, so I didn&rsquo;t have to design anything from scratch, which was exactly the problem that had killed this blog&rsquo;s relaunch more than once before.</p>
<p>Migrating the old export was mostly mechanical: every post became a Hugo &ldquo;page bundle&rdquo;, meaning its own folder containing an <code>index.md</code> and any images it needs, sitting right next to each other. Two sections came out of it: <code>technical</code> (this stuff) and <code>travelling</code>, an archive of a five-month trip round South East Asia in 2011 that had never been properly online before.</p>
<p>The genuinely fiddly part was dates. The technical posts were fine, with dates already sitting in the front matter. Most of the 35-odd travel posts weren&rsquo;t so simple: no date field, no dated photo, and no useful git history, because the whole lot had been dumped into the repo in a single bulk-import commit years after they were written. Working out when they&rsquo;d actually happened meant:</p>
<ul>
<li>Pulling dates out of the handful of posts that did have a dated photo attached</li>
<li>Cross-checking offhand details in the text, like &ldquo;Thursday 17th&rdquo; and &ldquo;Happy Saturday&rdquo;, against the 2011 calendar, which turned out to line up exactly</li>
<li>Going back to the source and asking for the actual trip itinerary, then using that to pin down everything else</li>
</ul>
<p>Every date I had to guess got flagged as such right in the post&rsquo;s own front matter (<code>dateApprox: true</code>) rather than quietly presented as fact. A wrong-looking date is still more useful than a suspiciously precise one nobody can trust.</p>
<p>Getting it live was the easy part by comparison: a GitHub Actions workflow builds the Hugo site and deploys it to GitHub Pages on every push to <code>main</code>, with the custom domain wired up through a CNAME record. The only hiccup since was GitHub deprecating Node.js 20 on its Actions runners mid-migration, which meant bumping a couple of pinned action versions to clear the warnings, though one of them still doesn&rsquo;t have a fix upstream, so that warning&rsquo;s stuck until GitHub ships one.</p>
]]></content:encoded></item><item><title>30 Steps to Vagrant and VMWare Fusion Awesomeness</title><link>http://blog.wegotoeleven.xyz/technical/30-steps-to-vagrant-and-vmware-fusion-awesomeness/</link><pubDate>Mon, 02 Mar 2020 00:00:00 +0000</pubDate><guid>http://blog.wegotoeleven.xyz/technical/30-steps-to-vagrant-and-vmware-fusion-awesomeness/</guid><description>&lt;p&gt;Vagrant is pretty cool, but of late I&amp;rsquo;ve been having real issues finding a Vagrant base box that works with VMware Fusion OOTB. My blogging workflow (used to) involve(s) using a Vagrant box with Jekyll to generate a static site on my local Mac, and then uploading to an S3 bucket. The Vagrant Jekyll boxes weren&amp;rsquo;t up to scratch, so I&amp;rsquo;ve decided to figure out how to create my own.&lt;/p&gt;</description><content:encoded><![CDATA[<p>Vagrant is pretty cool, but of late I&rsquo;ve been having real issues finding a Vagrant base box that works with VMware Fusion OOTB. My blogging workflow (used to) involve(s) using a Vagrant box with Jekyll to generate a static site on my local Mac, and then uploading to an S3 bucket. The Vagrant Jekyll boxes weren&rsquo;t up to scratch, so I&rsquo;ve decided to figure out how to create my own.</p>
<p>This guide covers how to create the box and add it to your list of boxes, for use in specifying within a Vagrantfile. It doesn&rsquo;t cover Vagrant fundementals, so I assume that you&rsquo;ll have some basic knowledge in how it works before embarking on this magical quest.</p>
<ol>
<li>
<p>Open VMware Fusion</p>
</li>
<li>
<p>Select “Install from disc or image” and click &ldquo;Continue&rdquo;
<img loading="lazy" src="/technical/30-steps-to-vagrant-and-vmware-fusion-awesomeness/images/2015-09-28-01.png"></p>
</li>
<li>
<p>Locate the ISO for the distribution you want to install, then select “Open”, and click &ldquo;Continue&rdquo;.
<img loading="lazy" src="/technical/30-steps-to-vagrant-and-vmware-fusion-awesomeness/images/2015-09-28-02.png"></p>
</li>
<li>
<p>Unselect the checkbox for “Use Easy Install”
<img loading="lazy" src="/technical/30-steps-to-vagrant-and-vmware-fusion-awesomeness/images/2015-09-28-03.png"></p>
</li>
<li>
<p>Choose “Customize Settings”, and enter a name for the VMware file (<code>name/OSarch</code>, i.e. <code>wegotoeleven/trusty64</code>) and select “Save&quot;
<img loading="lazy" src="/technical/30-steps-to-vagrant-and-vmware-fusion-awesomeness/images/2015-09-28-04.png"></p>
</li>
<li>
<p>Customise the VM’s settings</p>
<ol>
<li>Turn on Shared Folders
<img loading="lazy" src="/technical/30-steps-to-vagrant-and-vmware-fusion-awesomeness/images/2015-09-28-05.png"></li>
<li>Set memory to desired size, at least 1024MB
<img loading="lazy" src="/technical/30-steps-to-vagrant-and-vmware-fusion-awesomeness/images/2015-09-28-06.png"></li>
<li>Change the Networking to &ldquo;Share with my Mac&rdquo; (aka NAT)
<img loading="lazy" src="/technical/30-steps-to-vagrant-and-vmware-fusion-awesomeness/images/2015-09-28-07.png"></li>
<li>Change the disk size to 40 GB and deselect “Split into 2GB files”
<img loading="lazy" src="/technical/30-steps-to-vagrant-and-vmware-fusion-awesomeness/images/2015-09-28-08.png"></li>
<li>Turn off the sound card
<img loading="lazy" src="/technical/30-steps-to-vagrant-and-vmware-fusion-awesomeness/images/2015-09-28-09.png"></li>
<li>Expand &ldquo;Advanced USB options&rdquo; and select &ldquo;Remove USB Controller&rdquo;
<img loading="lazy" src="/technical/30-steps-to-vagrant-and-vmware-fusion-awesomeness/images/2015-09-28-10.png"></li>
<li>Untick &ldquo;Share Mac printers with Linux&rdquo;
<img loading="lazy" src="/technical/30-steps-to-vagrant-and-vmware-fusion-awesomeness/images/2015-09-28-11.png"></li>
</ol>
</li>
<li>
<p>Boot the VM, install the Guest OS and customise the following settings when prompted:
<img loading="lazy" src="/technical/30-steps-to-vagrant-and-vmware-fusion-awesomeness/images/2015-09-28-12.png"></p>
</li>
<li>
<p>Host Name: Same as the second part of the name of the VMware file (i.e. trusty64)
<img loading="lazy" src="/technical/30-steps-to-vagrant-and-vmware-fusion-awesomeness/images/2015-09-28-13.png"></p>
</li>
<li>
<p>Full Name: <code>vagrant</code>
<img loading="lazy" src="/technical/30-steps-to-vagrant-and-vmware-fusion-awesomeness/images/2015-09-28-14.png"></p>
</li>
<li>
<p>User: <code>vagrant</code>
<img loading="lazy" src="/technical/30-steps-to-vagrant-and-vmware-fusion-awesomeness/images/2015-09-28-15.png"></p>
</li>
<li>
<p>Password: <code>vagrant</code>
<img loading="lazy" src="/technical/30-steps-to-vagrant-and-vmware-fusion-awesomeness/images/2015-09-28-16.png"></p>
</li>
<li>
<p>Once setup and at the command prompt, login and change the Root Password. When asked, set to <code>vagrant</code></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo passwd root
</span></span></code></pre></div></li>
<li>
<p>Update the OS because updates</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo apt update <span class="o">&amp;&amp;</span> sudo apt upgrade -y
</span></span></code></pre></div></li>
<li>
<p>Update the Sudoers file with the following to allow the vagrant user sudo rights without having to authenticate with a password</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">#Defaults !visiblepw
</span></span><span class="line"><span class="cl">Defaults env_keep=&#34;SSH_AUTH_SOCK&#34;
</span></span></code></pre></div></li>
<li>
<p>Test. Is the following command outputs the current directory instead of an error, all is good</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo <span class="nb">pwd</span>
</span></span></code></pre></div></li>
<li>
<p>Restart VM</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo shutdown -r now
</span></span></code></pre></div></li>
<li>
<p>Make ssh folder</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ mkdir ~/.ssh
</span></span></code></pre></div></li>
<li>
<p>Set permissions</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ chmod <span class="m">700</span> ~/.ssh
</span></span></code></pre></div></li>
<li>
<p>Download Vagrant authorised keys</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ wget --no-check-certificate https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub -O ~/.ssh/authorized_keys
</span></span></code></pre></div></li>
<li>
<p>Set permissions on authorised keys file</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ chmod <span class="m">600</span> ~/.ssh/authorized_keys <span class="o">&amp;&amp;</span> chown -R vagrant ~/.ssh
</span></span></code></pre></div></li>
<li>
<p>Install OpenSSH</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo apt install openssh-server -y
</span></span></code></pre></div></li>
<li>
<p>Edit the SSH config file</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo nano /etc/ssh/sshd_config
</span></span></code></pre></div></li>
<li>
<p>Restart SSH service</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo service ssh restart
</span></span></code></pre></div></li>
<li>
<p>Install VMware Tools. Begin by mounting the VMware Tools by selecting Virtual Machines &gt; Install VMware Tools from the menu bar menu</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo mkdir -p /mnt/cdrom
</span></span><span class="line"><span class="cl">$ sudo mount /dev/cdrom /mnt/cdrom
</span></span><span class="line"><span class="cl">$ tar xzvf /mnt/cdrom/VMwareTools-9.2.2-893683.tar.gz -C /tmp
</span></span><span class="line"><span class="cl">$ <span class="nb">cd</span> /tmp/vmware-tools-distrib/
</span></span><span class="line"><span class="cl">$ sudo ./vmware-install.pl<span class="se">\
</span></span></span></code></pre></div></li>
<li>
<p>Wipe the free space on the VM to stop fragmentation</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo dd <span class="k">if</span><span class="o">=</span>/dev/zero <span class="nv">of</span><span class="o">=</span>/EMPTY <span class="nv">bs</span><span class="o">=</span>1M
</span></span><span class="line"><span class="cl">$ sudo rm -f /EMPTY
</span></span></code></pre></div></li>
<li>
<p>Shutdown the VM</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo shutdown -h now
</span></span></code></pre></div></li>
<li>
<p>Navigate to the location of your vmwarevm. By default this location is <code>~/Virtual Machines/</code>.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ <span class="nb">cd</span> ~/Virtual Machines/wegotoeleven:xenial64.vmwarevm
</span></span></code></pre></div><p>Note: Any forward slashes (<code>/</code>) will be translated into colons if the name of the VMware file contains a forward slash</p>
</li>
<li>
<p>Create a file named <code>metadata.json</code> and enter the following contents:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;provider&#34;</span><span class="p">:</span> <span class="s2">&#34;vmware_fusion&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span></code></pre></div></li>
<li>
<p>Create a file named <code>Vagrantfile</code> and enter the following contents.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-ruby" data-lang="ruby"><span class="line"><span class="cl"><span class="c1"># -*- mode: ruby -*-</span>
</span></span><span class="line"><span class="cl"><span class="c1"># vi: set ft=ruby</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="no">Vagrant</span><span class="o">.</span><span class="n">configure</span><span class="p">(</span><span class="s2">&#34;2&#34;</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">config</span><span class="o">|</span>
</span></span><span class="line"><span class="cl">  <span class="n">config</span><span class="o">.</span><span class="n">vm</span><span class="o">.</span><span class="n">provider</span> <span class="ss">:vmware_fusion</span> <span class="k">do</span> <span class="o">|</span><span class="n">v</span><span class="p">,</span> <span class="n">override</span><span class="o">|</span>
</span></span><span class="line"><span class="cl">    <span class="n">v</span><span class="o">.</span><span class="n">gui</span> <span class="o">=</span> <span class="kp">false</span>
</span></span><span class="line"><span class="cl">  <span class="k">end</span>
</span></span><span class="line"><span class="cl"><span class="k">end</span>
</span></span></code></pre></div></li>
<li>
<p>We next want to optimize the box to reduce it’s size:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">$ /Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager -d Virtual\ Disk.vmdk
</span></span><span class="line"><span class="cl">$ /Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager -k Virtual\ Disk.vmdk
</span></span></code></pre></div></li>
<li>
<p>Finally compress the box:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ tar cvzf package.box ./
</span></span></code></pre></div></li>
<li>
<p>Add the box to Vagrant</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ vagrant box add wegotoeleven/xenial64 package.box
</span></span></code></pre></div></li>
</ol>
<p>I couldn&rsquo;t have done this without the following blog posts:</p>
<ul>
<li><a href="https://www.skoblenick.com/vagrant/creating-a-custom-box-from-scratch">creating-a-custom-box-from-scratch</a></li>
<li><a href="https://blog.engineyard.com/2014/building-a-vagrant-box">building-a-vagrant-box</a></li>
</ul>
<p>And yeah. I know I said 30.</p>
]]></content:encoded></item><item><title>Puppet, PuppetDB and Puppet Agent</title><link>http://blog.wegotoeleven.xyz/technical/puppet-puppetdb-and-puppet-agent/</link><pubDate>Wed, 03 May 2017 00:00:00 +0000</pubDate><guid>http://blog.wegotoeleven.xyz/technical/puppet-puppetdb-and-puppet-agent/</guid><description>&lt;p&gt;I like the idea of desired state management systems. You define a set of criteria, and your devices will indefinitely match that criteria, returning to the &amp;ldquo;Desired State&amp;rdquo; if required. I&amp;rsquo;ve done this a few times with Jamf Pro, using smart groups, extension attributes and policies to &amp;ldquo;mimic&amp;rdquo; the functionality of a desired state management system (&lt;a href="https://www.youtube.com/watch?v=XOhZgAPn_CU"&gt;which was nice&lt;/a&gt;) but I wanted to really get to grips with a system that&amp;rsquo;s explicitly designed for this purpose. Enter the king of &amp;ldquo;Desired State&amp;rdquo; - &lt;em&gt;&lt;a href="https://puppet.com"&gt;Puppet&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;</description><content:encoded><![CDATA[<p>I like the idea of desired state management systems. You define a set of criteria, and your devices will indefinitely match that criteria, returning to the &ldquo;Desired State&rdquo; if required. I&rsquo;ve done this a few times with Jamf Pro, using smart groups, extension attributes and policies to &ldquo;mimic&rdquo; the functionality of a desired state management system (<a href="https://www.youtube.com/watch?v=XOhZgAPn_CU">which was nice</a>) but I wanted to really get to grips with a system that&rsquo;s explicitly designed for this purpose. Enter the king of &ldquo;Desired State&rdquo; - <em><a href="https://puppet.com">Puppet</a></em>.</p>
<p>In an effort to get to know Puppet, I need to build out some infrastructure. Yeah, I know there&rsquo;s a <a href="https://puppet.com/download-learning-vm">learning VM</a> (that&rsquo;s really awesome, by the way), but I learn by experience. What better way than to build my own.</p>
<h2 id="assumptions">Assumptions</h2>
<p>I&rsquo;m not going to get into the nitty gritty of what puppet actually is and does, and I&rsquo;m going to assume that if you&rsquo;re reading this post, you:</p>
<ol>
<li>Understand what Desired State is</li>
<li>Understand (roughly) what Puppet is and can do</li>
<li>Are poor / nuts, and would rather build and spin up your own servers, rather than using Puppet&rsquo;s <a href="https://puppet.com/product">Enterprise version</a> (which is still totally viable, but I&rsquo;m a masochist)</li>
</ol>
<p>For the purposes of this example, I will setup 3 VMs and use the following defaults:</p>
<ul>
<li>VMware Fusion 8.5.6 to host the VMs
<ul>
<li>Network set to custom &ldquo;vmnet2&rdquo; network
<ul>
<li>NAT</li>
<li>&ldquo;Connect Host Mac to this network&rdquo;</li>
<li>Provide DHCP, subnet 10.0.1.0/24</li>
</ul>
</li>
</ul>
</li>
<li>Puppet Server
<ul>
<li>Ubuntu 16.04</li>
<li>2 x CPU Cores</li>
<li>3072MB Memory</li>
<li>50GB HDD (thin provisioned)</li>
<li>Hostname <code>puppet-server</code></li>
<li>IP Address <code>10.0.1.129</code></li>
</ul>
</li>
<li>Puppet Database Server
<ul>
<li>Ubuntu 16.04</li>
<li>2 x CPU Cores</li>
<li>3072MB Memory</li>
<li>50GB HDD (thin provisioned)</li>
<li>Hostname <code>puppet-db</code></li>
<li>IP Address <code>10.0.1.130</code></li>
</ul>
</li>
<li>Puppet Test Client
<ul>
<li>macOS 10.12.4</li>
<li>2 x CPU Cores</li>
<li>8192MB Memory</li>
<li>50GB HDD (thin provisioned)</li>
<li>Hostname <code>puppet-client</code></li>
<li>IP Address <code>10.0.1.128</code></li>
</ul>
</li>
</ul>
<p>Obviously, if you&rsquo;re following along with me, feel free to change any of the above defaults, but please make sure you&rsquo;re changing them in the instructions below.</p>
<h2 id="network-configuration">Network Configuration</h2>
<ol>
<li>
<p>Spin up your boxes with the above config, and set each device up to allow access via SSH (cause it&rsquo;s easier like)</p>
</li>
<li>
<p>Rename both servers by editing the hostname file on each device, and adding the desired hostname</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo vi /etc/hostname
</span></span></code></pre></div></li>
<li>
<p>In addition, add the hostname into the hosts file, pointing to the loopback (<code>127.0.0.1</code>) address under the <code>localhost</code> entry</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo vi /etc/hosts
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">127.0.0.1       localhost
</span></span><span class="line"><span class="cl">127.0.0.1       puppet-db
</span></span></code></pre></div></li>
<li>
<p>In an environment without proper DNS, do the following:
4. Set each device with a static IP address. I&rsquo;m using the IP addresses specified above.</p>
<pre><code> ```bash
 $ sudo vi /etc/network/interfaces
 ```
 ```
 # The primary network interface
 		auto eth0
 		iface eth0 inet static
 		address 10.0.0.41
 		netmask 255.255.255.0
 		network 10.0.0.0
 		broadcast 10.0.0.255
 		gateway 10.0.0.1
 		dns-nameservers 10.0.0.1 8.8.8.8
 ```
</code></pre>
<ul>
<li>
<p>Add each device into the each device&rsquo;s hosts file</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo vi /etc/hosts
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">10.0.1.129    puppet-server
</span></span><span class="line"><span class="cl">10.0.1.130    puppet-db
</span></span><span class="line"><span class="cl">10.0.1.128    puppet-client
</span></span></code></pre></div></li>
</ul>
</li>
</ol>
<h2 id="puppet-server-configuration">Puppet Server Configuration</h2>
<ol start="8">
<li>
<p>Install the NTP service on the Puppet server, because Puppet uses an NTP source when issuing certificates to it&rsquo;s nodes</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo apt install ntp
</span></span></code></pre></div></li>
<li>
<p>Add the Puppet repositories to the Puppet Server</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ wget https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb
</span></span><span class="line"><span class="cl">$ sudo dpkg -i puppetlabs-release-pc1-xenial.deb
</span></span><span class="line"><span class="cl">$ sudo apt update
</span></span></code></pre></div></li>
<li>
<p>Install <code>puppetserver</code> on the Puppet Server (duh)</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo apt install puppetserver
</span></span></code></pre></div></li>
<li>
<p>In addition, install the &ldquo;puppetdb-termini&rdquo; package to enable the Puppet server to talk to the Puppet DB server</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo /opt/puppetlabs/puppet/bin/puppet resource package puppetdb-termini <span class="nv">ensure</span><span class="o">=</span>latest
</span></span></code></pre></div></li>
<li>
<p>Create the required configuration files on the Puppet server for the connections to the PuppetDB:</p>
<ul>
<li>
<p>routes.yaml:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo vi /etc/puppetlabs/puppet/routes.yaml
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nn">---</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">master</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">facts</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">terminus</span><span class="p">:</span><span class="w"> </span><span class="l">puppetdb</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">cache</span><span class="p">:</span><span class="w"> </span><span class="l">yaml</span><span class="w">
</span></span></span></code></pre></div></li>
<li>
<p>puppetdb.conf:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo vi /etc/puppetlabs/puppet/puppetdb.conf
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">[main]
</span></span><span class="line"><span class="cl">server_urls = https://puppet-db:8081
</span></span></code></pre></div></li>
</ul>
</li>
<li>
<p>Edit puppet.conf</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo vi /etc/puppetlabs/puppet/puppet.conf
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">[master]
</span></span><span class="line"><span class="cl">storeconfigs = true
</span></span><span class="line"><span class="cl">storeconfigs_backend = puppetdb
</span></span></code></pre></div></li>
<li>
<p>Ensure the permissions are correct on the Puppet configuration folder</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo chown -R puppet:puppet <span class="k">$(</span>sudo /opt/puppetlabs/puppet/bin/puppet config print confdir<span class="k">)</span>
</span></span></code></pre></div></li>
<li>
<p>Set <code>puppetserver</code> to start automatically when the system starts</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo /opt/puppetlabs/puppet/bin/puppet resource service puppetserver <span class="nv">ensure</span><span class="o">=</span>running <span class="nv">enable</span><span class="o">=</span><span class="nb">true</span>
</span></span></code></pre></div></li>
<li>
<p>Restart the Server to pickup the above changes.</p>
</li>
</ol>
<h2 id="puppet-db-server-configuration">Puppet DB Server Configuration</h2>
<ol start="6">
<li>
<p>Add the Puppet repositories to the Puppet DB Server</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ wget https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb
</span></span><span class="line"><span class="cl">$ sudo dpkg -i puppetlabs-release-pc1-xenial.deb
</span></span></code></pre></div></li>
<li>
<p>Install the Database backend for PuppetDB</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo sh -c <span class="s1">&#39;echo &#34;deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main&#34; &gt;&gt; /etc/apt/sources.list.d/pgdg.list&#39;</span>
</span></span><span class="line"><span class="cl">$ wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - <span class="p">|</span> sudo apt-key add -
</span></span><span class="line"><span class="cl">$ sudo apt update
</span></span><span class="line"><span class="cl">$ sudo apt install postgresql postgresql-contrib
</span></span></code></pre></div></li>
<li>
<p>Setup PostgreSQL on the Puppet DB Server</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo -u postgres sh
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">createuser</span><span class="w"> </span><span class="o">-</span><span class="n">DRSP</span><span class="w"> </span><span class="n">puppetdb</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">createdb</span><span class="w"> </span><span class="o">-</span><span class="n">E</span><span class="w"> </span><span class="n">UTF8</span><span class="w"> </span><span class="o">-</span><span class="n">O</span><span class="w"> </span><span class="n">puppetdb</span><span class="w"> </span><span class="n">puppetdb</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="n">psql</span><span class="w"> </span><span class="n">puppetdb</span><span class="w"> </span><span class="o">-</span><span class="k">c</span><span class="w"> </span><span class="s1">&#39;create extension pg_trgm&#39;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="n">exit</span><span class="w">
</span></span></span></code></pre></div></li>
<li>
<p>Restart the PostgreSQL service</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo service postgresql restart
</span></span></code></pre></div></li>
<li>
<p>Test PostgreSQL. If this is successful, you&rsquo;ll be dropped into PostgreSQL. Use <code>\q</code> to exit.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ psql -h localhost puppetdb puppetdb
</span></span></code></pre></div></li>
<li>
<p>To configure PuppetDB to use this database, add the following details to the <code>puppetdb</code> database configuration file. In this example, I&rsquo;m using super secret usernames and passwords. Don&rsquo;t do this if you&rsquo;re planning on setting this up in prod.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo vi /etc/puppetlabs/puppetdb/conf.d/database.ini
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">subname = //localhost:5432/puppetdb
</span></span><span class="line"><span class="cl">username = puppetdb
</span></span><span class="line"><span class="cl">password = puppetdb
</span></span></code></pre></div><p>For the <code>subname</code>, replace the hostname with the DB server’s hostname (or <code>localhost</code> if the PostgreSQL service is running on the same server), replace the port with the port on which PostgreSQL is listening (usually 5432), and replace the database with the name of the database you’ve created for use with PuppetDB. In addition, uncomment the following sections:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">classname
</span></span><span class="line"><span class="cl">subprotocol
</span></span><span class="line"><span class="cl">gc-interval
</span></span></code></pre></div></li>
</ol>
<h2 id="connecting-the-servers-together">Connecting the servers together</h2>
<ol start="20">
<li>
<p>Install the Puppet Agent on the Puppet DB Server</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo apt install puppet-agent
</span></span></code></pre></div></li>
<li>
<p>On the Puppet DB server, set the name of the server that the agent should connect to, replacing the server with the required hostname of the Puppet server</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo vi /etc/puppetlabs/puppet/puppet.conf
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">server = puppet-server
</span></span></code></pre></div></li>
<li>
<p>Enrol the Puppet DB Server into Puppet</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo /opt/puppetlabs/puppet/bin/puppet agent --test --waitforcert <span class="m">60</span>
</span></span></code></pre></div></li>
<li>
<p>On the Puppet Server, check to see whether the Puppet DB server has requested a certificate</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo /opt/puppetlabs/puppet/bin/puppet cert --list
</span></span></code></pre></div></li>
<li>
<p>You should see the name of the Puppet DB server, followed by some other stuff. Accept the cert request</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo /opt/puppetlabs/puppet/bin/puppet cert --sign puppet-db
</span></span></code></pre></div></li>
<li>
<p>On the Puppet DB server, install the <code>puppetdb</code> service</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo /opt/puppetlabs/puppet/bin/puppet resource package puppetdb <span class="nv">ensure</span><span class="o">=</span>latest
</span></span></code></pre></div></li>
<li>
<p>Stop the <code>puppetdb</code> service and setup SSL</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo service puppetdb stop <span class="o">&amp;&amp;</span> sudo /opt/puppetlabs/bin/puppetdb ssl-setup
</span></span></code></pre></div></li>
<li>
<p>Ensure the <code>puppetdb</code> service runs on reboot</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo /opt/puppetlabs/puppet/bin/puppet resource service puppetserver <span class="nv">ensure</span><span class="o">=</span>running <span class="nv">enable</span><span class="o">=</span><span class="nb">true</span>
</span></span></code></pre></div></li>
<li>
<p>Restart the Puppet DB server</p>
</li>
<li>
<p>Check the PuppetDB logs on the Puppet DB server to verify that it&rsquo;s working</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo cat /var/log/puppetlabs/puppetdb/puppetdb.log
</span></span></code></pre></div></li>
</ol>
<h2 id="enrolling-a-macos-client">Enrolling a macOS client</h2>
<ol>
<li>
<p>Install the puppet agent onto the Puppet Client, by downloading the specific version as per the OS version, from <a href="https://downloads.puppetlabs.com/mac/">here</a></p>
</li>
<li>
<p>Install the download pkg file. When asked, specify the hostname of the server and the client</p>
</li>
<li>
<p>Open Terminal</p>
</li>
<li>
<p>Edit the Puppet configuration file and add the following contents</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo vi /etc/puppetlabs/puppet/puppet.conf
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-gdscript3" data-lang="gdscript3"><span class="line"><span class="cl"><span class="p">[</span><span class="n">main</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"><span class="n">logdir</span><span class="o">=/</span><span class="k">var</span><span class="o">/</span><span class="nb">log</span><span class="o">/</span><span class="n">puppet</span>
</span></span><span class="line"><span class="cl"><span class="n">vardir</span><span class="o">=/</span><span class="k">var</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">puppet</span>
</span></span><span class="line"><span class="cl"><span class="n">ssldir</span><span class="o">=/</span><span class="k">var</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">puppet</span><span class="o">/</span><span class="n">ssl</span>
</span></span><span class="line"><span class="cl"><span class="c1">#rundir=/var/run/puppet</span>
</span></span><span class="line"><span class="cl"><span class="n">factpath</span><span class="o">=$</span><span class="n">vardir</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">facter</span>
</span></span><span class="line"><span class="cl"><span class="n">templatedir</span><span class="o">=$</span><span class="n">confdir</span><span class="o">/</span><span class="n">templates</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">[</span><span class="n">master</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"><span class="n">ssl_client_header</span> <span class="o">=</span> <span class="n">SSL_CLIENT_S_DN</span>
</span></span><span class="line"><span class="cl"><span class="n">ssl_client_verify_header</span> <span class="o">=</span> <span class="n">SSL_CLIENT_VERIFY</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">[</span><span class="n">agent</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"><span class="n">server</span><span class="o">=</span><span class="n">puppet</span><span class="o">-</span><span class="n">server</span>
</span></span><span class="line"><span class="cl"><span class="n">certname</span><span class="o">=</span><span class="n">puppet</span><span class="o">-</span><span class="n">client</span>
</span></span><span class="line"><span class="cl"><span class="n">report</span><span class="o">=</span><span class="bp">true</span>
</span></span><span class="line"><span class="cl"><span class="n">pluginsync</span><span class="o">=</span><span class="bp">true</span>
</span></span></code></pre></div></li>
<li>
<p>Request a cert from the Puppet Server</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo /opt/puppetlabs/puppet/bin/puppet agent --waitforcert <span class="m">60</span> --test
</span></span></code></pre></div></li>
<li>
<p>On the Puppet DB server, run the log file and keep an eye on it</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo tail -f /var/log/puppetlabs/puppetdb/puppetdb.log
</span></span></code></pre></div></li>
<li>
<p>Then, on the Puppet Server, check and sign the cert request from <code>puppet-client</code></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo /opt/puppetlabs/puppet/bin/puppet cert --list
</span></span><span class="line"><span class="cl">$ sudo /opt/puppetlabs/puppet/bin/puppet cert --sign puppet-client
</span></span></code></pre></div></li>
</ol>
]]></content:encoded></item><item><title>Using Markdown to write Documentation</title><link>http://blog.wegotoeleven.xyz/technical/using-markdown-to-write-documentation/</link><pubDate>Mon, 28 Sep 2015 00:00:00 +0000</pubDate><guid>http://blog.wegotoeleven.xyz/technical/using-markdown-to-write-documentation/</guid><description>&lt;p&gt;I absolutely cannot stand writing documentation. Well, that&amp;rsquo;s kind of a lie; I don&amp;rsquo;t mind the actual writing, but I get too hung up on trying to make it look pretty. If you—the reader—write your own, then maybe you&amp;rsquo;ll know what I mean.&lt;/p&gt;
&lt;p&gt;One of the best things about writing docs that&amp;rsquo;ll be hosted on-line is that the format will be based upon the site that it lives in. Take Github for example; all documentation up there looks the same. This is because they&amp;rsquo;re all written in &lt;a href="https://daringfireball.net/projects/markdown/"&gt;Markdown&lt;/a&gt;. Markdown is a language syntax that standardises formatting which allows a writer to focus on the content that&amp;rsquo;s being written. If you&amp;rsquo;ve never seen a Github readme, check out a few:&lt;/p&gt;</description><content:encoded><![CDATA[<p>I absolutely cannot stand writing documentation. Well, that&rsquo;s kind of a lie; I don&rsquo;t mind the actual writing, but I get too hung up on trying to make it look pretty. If you—the reader—write your own, then maybe you&rsquo;ll know what I mean.</p>
<p>One of the best things about writing docs that&rsquo;ll be hosted on-line is that the format will be based upon the site that it lives in. Take Github for example; all documentation up there looks the same. This is because they&rsquo;re all written in <a href="https://daringfireball.net/projects/markdown/">Markdown</a>. Markdown is a language syntax that standardises formatting which allows a writer to focus on the content that&rsquo;s being written. If you&rsquo;ve never seen a Github readme, check out a few:</p>
<ul>
<li><a href="https://github.com/munki/munki/blob/master/README.md">Munki</a></li>
<li><a href="https://github.com/autopkg/autopkg/blob/master/ReadMe.md">Autopkg</a></li>
<li>Docker container for <a href="https://github.com/wegotoeleven/dockerfiles/blob/master/boot2docker-transmission/README.md">Transmission</a></li>
</ul>
<p>This blog is also written in markdown. The CSS on this blog is used to apply styles to the various components of a converted markdown document. I&rsquo;m not going to go into every piece of Markdown syntax as it&rsquo;s not the point of this post, but hopefully you get the idea.</p>
<p>So how cool would it be to leverage this when writing printed documentation?</p>
<p>Let&rsquo;s get one thing straight; Markdown was build for web rendering. So out of the box, there&rsquo;s no easy way to create a document in Markdown, and export to, say, PDF or Word document.</p>
<p>That&rsquo;s where <a href="www.pandoc.org">Pandoc</a> comes in.</p>
<p>Pandoc is a tool that converts files from one markup format to another. It&rsquo;s a downloadable application for <a href="https://github.com/jgm/pandoc/releases/download/1.15.0.6/pandoc-1.15.0.6-osx.pkg">Mac</a>, <a href="https://github.com/jgm/pandoc/releases/download/1.15.0.6/pandoc-1.15.0.6-windows.msi">Windows</a> and <a href="https://github.com/jgm/pandoc/releases/download/1.15.0.6/pandoc-1.15.0.6-1-amd64.deb">Linux</a> that runs in the command line in the format of:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ pandoc -f <span class="si">${</span><span class="nv">input</span><span class="p">-format</span><span class="si">}</span> <span class="si">${</span><span class="nv">input</span><span class="p">-file</span><span class="si">}</span> <span class="se">\
</span></span></span><span class="line"><span class="cl">    -t <span class="si">${</span><span class="nv">output</span><span class="p">-format</span><span class="si">}</span> -o <span class="si">${</span><span class="nv">output</span><span class="p">-file</span><span class="si">}</span>
</span></span></code></pre></div><p>As standard, it uses a predefined format when it spits out a Word document, that looks not unlike Word&rsquo;s default normal.dot. However, with the use of the <code>--reference-docx</code> option, you can specify a docx file that contains a custom format in order to format the output of the command.</p>
<p>For example:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ pandoc -f markdown ~/Desktop/Documentation.markdown <span class="se">\
</span></span></span><span class="line"><span class="cl">    -t docx -o ~/Desktop/Documentation.docx <span class="se">\
</span></span></span><span class="line"><span class="cl">    --reference-docx ~/Desktop/Reference.docx
</span></span></code></pre></div><p>This will convert the file &ldquo;<code>Documentation.markdown</code>&rdquo; into a Word document called &ldquo;<code>Documentation.docx</code>&rdquo;, using the reference file &ldquo;<code>Reference.docx</code>&rdquo;</p>
<p>So, about these reference docx files. &ldquo;Where can I get them from&rdquo; I hear you shout? Well, I&rsquo;ve been rather unsuccessful in my attempts to find any. <a href="assets/2015-09-28-01.doc">So I made my own!</a> Here&rsquo;s one that looks like a rendered Markdown webpage. Plug this in to the above commands, and your markdown will &ldquo;accurately&rdquo; translate into printed documentation!</p>
<p>If you&rsquo;re a Markdown writer/user, and you have a hard time focusing on content rather than design, give this a go.</p>
]]></content:encoded></item><item><title>Jamf Pro's Reported IP Address fun and games</title><link>http://blog.wegotoeleven.xyz/technical/jamf-pro-reported-ip-address/</link><pubDate>Thu, 01 Jan 2015 00:00:00 +0000</pubDate><guid>http://blog.wegotoeleven.xyz/technical/jamf-pro-reported-ip-address/</guid><description>&lt;p&gt;I had a user with an issue recently where their Mac record in Jamf Pro was not being populated with a correct &amp;ldquo;Reported IP Address&amp;rdquo; value when connected to the company&amp;rsquo;s corporate WiFi. The IP address of the WiFi interface would report the correct value on the device and was singable.&lt;/p&gt;
&lt;p&gt;For context, this issue:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Persisted between inventory updates&lt;/li&gt;
&lt;li&gt;Would only ever be present when connecting to WiFi (i.e. the issue abated when disabling WiFi and connecting to Ethernet)&lt;/li&gt;
&lt;li&gt;Would not be resolved by forgetting the SSID and/or deleting and re-adding the network interface&lt;/li&gt;
&lt;li&gt;Would not be affected by renewing the DHCP lease.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Doing some digging, &lt;a href="https://learn.jamf.com/bundle/technical-articles/page/Collecting_the_IP_Address_and_Reported_IP_Address_in_Jamf_Pro.html"&gt;the documentation&lt;/a&gt; for the &amp;ldquo;Reported IP Address&amp;rdquo; field in Jamf Pro notes that:&lt;/p&gt;</description><content:encoded><![CDATA[<p>I had a user with an issue recently where their Mac record in Jamf Pro was not being populated with a correct &ldquo;Reported IP Address&rdquo; value when connected to the company&rsquo;s corporate WiFi. The IP address of the WiFi interface would report the correct value on the device and was singable.</p>
<p>For context, this issue:</p>
<ul>
<li>Persisted between inventory updates</li>
<li>Would only ever be present when connecting to WiFi (i.e. the issue abated when disabling WiFi and connecting to Ethernet)</li>
<li>Would not be resolved by forgetting the SSID and/or deleting and re-adding the network interface</li>
<li>Would not be affected by renewing the DHCP lease.</li>
</ul>
<p>Doing some digging, <a href="https://learn.jamf.com/bundle/technical-articles/page/Collecting_the_IP_Address_and_Reported_IP_Address_in_Jamf_Pro.html">the documentation</a> for the &ldquo;Reported IP Address&rdquo; field in Jamf Pro notes that:</p>
<blockquote>
<p>The reported IP address is collected by the jamf binary during a check-in and can be received by executing the following command:</p>
<p><code>ifconfig</code></p>
</blockquote>
<p>While this is technically correct, the documentation doesn&rsquo;t explicitly state where this information is collected from during an inventory; it&rsquo;s actually parsed from a file on disk, <code>/Library/Preferences/SystemConfiguration/preferences.plist</code>. Searching though this file for the incorrect IP address highlighted that the user had many, <em>many</em> interfaces (typically caused when moving between desks that have hubs or monitors with build in Ethernet interfaces), and one of these used a Static IP address assignment:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">IPV4 = {
</span></span><span class="line"><span class="cl">	Addresses = (
</span></span><span class="line"><span class="cl">		&#34;10.14.28.1&#34;
</span></span><span class="line"><span class="cl">	);
</span></span><span class="line"><span class="cl">	ConfigMethod = Manual;
</span></span><span class="line"><span class="cl">	...
</span></span><span class="line"><span class="cl">}
</span></span></code></pre></div><p>Finding and removing the static IP from the above interface immediately fixed the issue the next time that the Mac checked into Jamf Pro.</p>
<p>It does beg the question however, whether the &ldquo;Reported IP Address&rdquo; collection process in Jamf Pro could be improved to validate whether the interface is connected before logging it.</p>
]]></content:encoded></item></channel></rss>