<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>100 Things to do with Open Source Software</title><link href="https://100things.wzzrd.com/" rel="alternate"/><link href="https://100things.wzzrd.com/feed.xml" rel="self"/><id>https://100things.wzzrd.com/</id><updated>2026-10-17T16:34:00+02:00</updated><subtitle>to do with Open Source Software</subtitle><entry><title>How to build zellij on Fedora 44</title><link href="https://100things.wzzrd.com/2026/10/17/building-zellij-on-fedora-44.html" rel="alternate"/><published>2026-10-17T16:34:00+02:00</published><updated>2026-10-17T16:34:00+02:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2026-10-17:/2026/10/17/building-zellij-on-fedora-44.html</id><summary type="html">&lt;h1&gt;Building zellij&lt;/h1&gt;
&lt;p&gt;Just a small one for myself (and anyone else looking to build the zellij terminal
multiplexer on Fedora 44).&lt;/p&gt;
&lt;p&gt;During the build of zellij, cargo will try to build openssl-sys. I always end up adding
the required operating system packages one by one in a repeating trial and …&lt;/p&gt;</summary><content type="html">&lt;h1&gt;Building zellij&lt;/h1&gt;
&lt;p&gt;Just a small one for myself (and anyone else looking to build the zellij terminal
multiplexer on Fedora 44).&lt;/p&gt;
&lt;p&gt;During the build of zellij, cargo will try to build openssl-sys. I always end up adding
the required operating system packages one by one in a repeating trial and error to make
the build work. So for the next time I (or someone else) runs into this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo dnf install openssl-devel perl-Time-Piece perl-File-Copy \ 
    perl-File-Compare perl-IPC-Cmd perl-FindBin
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then &lt;code&gt;cargo build zellij&lt;/code&gt; should just work. Enjoy ;-)&lt;/p&gt;</content><category term="rust"/><category term="zellij"/><category term="cargo"/><category term="rust"/><category term="fedora"/></entry><entry><title>How I manage SSL certificates for my homelab with Letsencrypt and Ansible</title><link href="https://100things.wzzrd.com/2025/05/30/homelab-letsencrypt-certificates-with-ansible.html" rel="alternate"/><published>2025-05-30T09:12:00+02:00</published><updated>2025-05-30T09:12:00+02:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2025-05-30:/2025/05/30/homelab-letsencrypt-certificates-with-ansible.html</id><summary type="html">&lt;h1&gt;How I manage SSL certificates for my homelab with Letsencrypt and Ansible&lt;/h1&gt;
&lt;p&gt;I have a fairly sizable homelab, consisting of some Raspberry Pi 4s, some Intel Nucs, a Synology NAS with a VM running on it and a number of free VMs in Oracle cloud. All these machines run RHEL …&lt;/p&gt;</summary><content type="html">&lt;h1&gt;How I manage SSL certificates for my homelab with Letsencrypt and Ansible&lt;/h1&gt;
&lt;p&gt;I have a fairly sizable homelab, consisting of some Raspberry Pi 4s, some Intel Nucs, a Synology NAS with a VM running on it and a number of free VMs in Oracle cloud. All these machines run RHEL 9 or RHEL 10 and all of them are managed from an instance of Red Hat Ansible Automation Platform that runs on the VM on my NAS.&lt;/p&gt;
&lt;p&gt;On most of these machines, I run podman containers behind caddy (which takes care of any SSL certificate management automatically). But for some services, I really needed an automated way of managing SSL certificates that didn't involve Caddy. An example for this is cockpit, which I use on some occasions. I hate those "your connection is not secure messages", so I needed &lt;em&gt;real&lt;/em&gt; SSL certificates that my whole network would trust without the need of me having to load custom CA certificates in every single device.&lt;/p&gt;
&lt;p&gt;I also use this method for securing my internal Postfix relay, and (in a slightly different way) for setting up certificates for containers running on my NAS. &lt;/p&gt;
&lt;p&gt;So. Ansible to the rescue. It turns out, there is a surprisingly easy way to do this with Ansible. I found some code floating around the internet. To be honest,  I forgot where I got it, it was probably a GitHub gist, but I really don't remember: I wrote this playbook months and months ago - I would love to attribute credit for this, but I simply can't :(&lt;/p&gt;
&lt;p&gt;The point of the playbook is that it takes a list of certificates that should exist on a machine, and it makes sure those certificates exist on the target machine. Because this is for machines that are &lt;em&gt;not&lt;/em&gt; connected to the internet, it's not possible to use the standard HTTP verification. Instead, it creates temporary DNS records to verify my ownership of the domain.&lt;/p&gt;
&lt;p&gt;Let's break down how the playbook works. I'll link to the full playbook at the end.&lt;/p&gt;
&lt;p&gt;Keep in mind that all tasks below are meant to be run as a playbook looping over a list of dictionaries that are structures as follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;le_certificates&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;common_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;mymachine.example.com&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;basedir&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;/etc/letsencrypt&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;.example.com&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;security-team@example.com&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;First, we make sure a directory exists to store the certificate. We check for the existence of a Letsencrypt account key and if that does not exist, we create it and copy it over to the client:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Create directory to store certificate information&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;directory&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;0710&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;cert_directory_user&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;group&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;cert_directory_group&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Check if account private key exists&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.stat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/account_{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.key&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;register&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;account_key&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Generate and copy over the acme account private key&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;when&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;not account_key.stat.exists | bool&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;block&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Generate private account key for letsencrypt&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;community.crypto.openssl_privatekey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;/tmp/account_{{ item.common_name }}.key&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;RSA&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;delegate_to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;localhost&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;become&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;false&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;when&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;not account_key.stat.exists | bool&lt;/span&gt;

&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Copy over private account key to client&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.copy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;/tmp/account_{{ item.common_name }}.key&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;dest&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/account_{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.key&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;0640&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;root&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;group&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;root&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The next step is to check for the existence of a private key for the domain we are handling, and create it and copy it to the client if it doesn't exist:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Check if certificate private key exists&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.stat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.key&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;register&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;cert_key&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Generate and copy over the acme cert private key&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;when&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;not cert_key.stat.exists | bool&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;block&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Generate private acme key for letsencrypt&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;community.crypto.openssl_privatekey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;/tmp/{{ item.common_name }}.key&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;RSA&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;delegate_to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;localhost&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;become&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;false&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;when&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;not cert_key.stat.exists | bool&lt;/span&gt;

&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Copy over private acme key to client&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.copy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;/tmp/{{ item.common_name }}.key&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;dest&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.key&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;0640&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;root&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;group&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;root&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then, we create a certificate signing request (CSR) based on the private key, and copy that to the client:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Generate and copy over the csr&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;block&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Grab the private key from the host&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.slurp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.key&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;register&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;remote_cert_key&lt;/span&gt;

&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Generate the csr&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;community.crypto.openssl_csr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;/tmp/{{ item.common_name }}.csr&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;privatekey_content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;remote_cert_key[&amp;#39;content&amp;#39;]&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;|&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;b64decode&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;common_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;delegate_to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;localhost&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;become&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;false&lt;/span&gt;

&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Copy over csr to client&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.copy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;/tmp/{{ item.common_name }}.csr&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;dest&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.csr&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;0640&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;root&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;group&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;root&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now the slightly more complicated stuff starts. This next task contacts the Letsencrypt API and requests a certificate. It specifies a &lt;code&gt;dns-01&lt;/code&gt; challenge, which means that Letsencrypt will respond with a challenge that we can validate our request through the creation of a special DNS record. All we need is in the response, which well store as &lt;code&gt;cert_challenge&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Create a challenge using an account key file.&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;community.crypto.acme_certificate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;account_key_src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/account_{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.key&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;account_email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.email&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.csr&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;cert&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.crt&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;challenge&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;dns-01&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;acme_version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;2&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;acme_directory&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;acme_dir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="c1"&gt;# Renew if the certificate is at least 30 days old&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;remaining_days&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;60&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;terms_agreed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;true&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;register&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;cert_challenge&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now, I'll be using DigitalOcean's API to create the temporary DNS records, but you can use whatever DNS service you want, as long as it's publicly available for Letsencrypt to query. The following block will only run if two things are true: 
 1. the &lt;code&gt;cert_challenge&lt;/code&gt; is &lt;code&gt;changed&lt;/code&gt;, which is only so if we need to renew the certificate. Letsencrypt certificates are valid for 90 days only. We specified &lt;code&gt;remaining_days: 60&lt;/code&gt;, so if we run this playbook 30 or more days after its previous run, &lt;code&gt;cert_challenge&lt;/code&gt; will be &lt;code&gt;changed&lt;/code&gt; and the certificate will be renewed.
 2. item.common_name (which is a variable that holds the requested DNS record) is part of the &lt;code&gt;challenge_data&lt;/code&gt; structure in &lt;code&gt;cert_challenge&lt;/code&gt;. This is to verify we actually got the correct data from the Letsencrypt API, and not just some metadata change.&lt;/p&gt;
&lt;p&gt;The block looks like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Actual certificate creation&lt;/span&gt;
&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="w w-Error"&gt; &lt;/span&gt;&lt;span class="nt"&gt;when&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;cert_challenge is changed and item.common_name in cert_challenge.challenge_data&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;block&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Create DNS challenge record on DO&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;community.digitalocean.digital_ocean_domain_record&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;present&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;oauth_token&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;do_api_token&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.domain[1:]&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;TXT&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;ttl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;60&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;cert_challenge.challenge_data[item.common_name][&amp;#39;dns-01&amp;#39;].record&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;|&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;replace(item.domain,&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;&amp;#39;)&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;cert_challenge.challenge_data[item.common_name][&amp;#39;dns-01&amp;#39;].resource_value&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;delegate_to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;localhost&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;become&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;false&lt;/span&gt;

&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Let the challenge be validated and retrieve the cert and intermediate certificate&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;community.crypto.acme_certificate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;account_key_src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/account_{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.key&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;account_email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.email&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.csr&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;cert&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.crt&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;fullchain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.domain[1:]&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}-fullchain.crt&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;chain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.domain[1:]&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}-intermediate.crt&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;challenge&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;dns-01&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;acme_version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;2&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;acme_directory&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;acme_dir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;remaining_days&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;60&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;terms_agreed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;true&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;cert_challenge&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;

&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Remove DNS challenge record on DO&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;community.digitalocean.digital_ocean_domain_record&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;absent&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;oauth_token&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;do_api_token&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.domain[1:]&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;TXT&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;cert_challenge.challenge_data[item.common_name][&amp;#39;dns-01&amp;#39;].record&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;|&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;replace(item.domain,&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;&amp;#39;)&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;cert_challenge.challenge_data[item.common_name][&amp;#39;dns-01&amp;#39;].resource_value&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;delegate_to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;localhost&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;become&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You'll notice that the TTL for this record is intentionally very low, because we don't need it other than for validation of the challenge, and we'll remove it after vertification. If you do not use DigitalOcean as a DNS provider, the first task in the block above will look different, obviously.&lt;/p&gt;
&lt;p&gt;The second task in the block reruns the &lt;code&gt;acme_certificate&lt;/code&gt; task, and this time we pass the contents of the &lt;code&gt;cert_challenge&lt;/code&gt; variable as the &lt;code&gt;data&lt;/code&gt; parameter.  Upon successful validation, we can store retrieve the new certificate, full chain and intermediate chain to disk. Basically, at this point, we are done without having to use certbot :) &lt;/p&gt;
&lt;p&gt;Of course, in the third task, we clean up the temporary DNS record again.&lt;/p&gt;
&lt;p&gt;I have a slightly different playbook to manage certificates on my NAS, and some additional tasks that configure Postfix to use this certificate, too, but those are probably useful for me only.&lt;/p&gt;
&lt;p&gt;TL;DR: it you want to create a (set of) certificate(s) for a (group of) machine(s), running this playbook from AAP every month makes that really easy.&lt;/p&gt;
&lt;p&gt;The main playbook looks like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="c1"&gt;# file: letsencrypt.yml&lt;/span&gt;
&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Configure letsencrypt certificates&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;hosts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;rhel_machines&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;gather_facts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;false&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;become&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;true&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;vars&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;debug&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;false&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;acme_dir&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;https://acme-v02.api.letsencrypt.org/directory&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;pre_tasks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Gather facts subset&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.setup&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;gather_subset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;!all&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;default_ipv4&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;default_ipv6&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Include letsencrypt tasks for each certificate&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.include_tasks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;letsencrypt_tasks.yml&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;loop&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;le_certificates&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;letsencrypt_tasks.yml&lt;/code&gt; file is all of the above tasks combined into a single playbook:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="c1"&gt;# file: letsencrypt_tasks.yml&lt;/span&gt;

&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Create directory to store certificate information&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;directory&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;0710&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;cert_directory_user&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;group&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;cert_directory_group&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;

&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Check if account private key exists&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.stat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/account_{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.key&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;register&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;account_key&lt;/span&gt;

&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Generate and copy over the acme account private key&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;when&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;not account_key.stat.exists | bool&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;block&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Generate private account key for letsencrypt&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;community.crypto.openssl_privatekey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;/tmp/account_{{ item.common_name }}.key&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;RSA&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;delegate_to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;localhost&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;become&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;false&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;when&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;not account_key.stat.exists | bool&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Copy over private account key to client&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.copy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;/tmp/account_{{ item.common_name }}.key&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;dest&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/account_{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.key&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;0640&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;root&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;group&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;root&lt;/span&gt;

&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Check if certificate private key exists&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.stat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.key&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;register&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;cert_key&lt;/span&gt;

&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Generate and copy over the acme cert private key&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;when&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;not cert_key.stat.exists | bool&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;block&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Generate private acme key for letsencrypt&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;community.crypto.openssl_privatekey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;/tmp/{{ item.common_name }}.key&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;RSA&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;delegate_to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;localhost&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;become&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;false&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;when&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;not cert_key.stat.exists | bool&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Copy over private acme key to client&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.copy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;/tmp/{{ item.common_name }}.key&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;dest&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.key&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;0640&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;root&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;group&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;root&lt;/span&gt;

&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Generate and copy over the csr&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;block&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Grab the private key from the host&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.slurp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.key&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;register&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;remote_cert_key&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Generate the csr&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;community.crypto.openssl_csr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;/tmp/{{ item.common_name }}.csr&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;privatekey_content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;remote_cert_key[&amp;#39;content&amp;#39;]&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;|&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;b64decode&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;common_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;delegate_to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;localhost&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;become&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;false&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Copy over csr to client&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.copy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;/tmp/{{ item.common_name }}.csr&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;dest&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.csr&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;0640&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;root&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;group&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;root&lt;/span&gt;

&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Create a challenge using an account key file.&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;community.crypto.acme_certificate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;account_key_src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/account_{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.key&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;account_email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.email&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.csr&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;cert&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.crt&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;challenge&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;dns-01&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;acme_version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;2&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;acme_directory&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;acme_dir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c1"&gt;# Renew if the certificate is at least 30 days old&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;remaining_days&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;60&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;terms_agreed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;true&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;register&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;cert_challenge&lt;/span&gt;

&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Actual certificate creation&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;when&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;cert_challenge is changed and item.common_name in cert_challenge.challenge_data&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;block&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Create DNS challenge record on DO&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;community.digitalocean.digital_ocean_domain_record&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;present&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;oauth_token&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;do_api_token&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.domain[1:]&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;TXT&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;ttl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;60&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;cert_challenge.challenge_data[item.common_name][&amp;#39;dns-01&amp;#39;].record&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;|&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;replace(item.domain,&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;&amp;#39;)&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;cert_challenge.challenge_data[item.common_name][&amp;#39;dns-01&amp;#39;].resource_value&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;delegate_to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;localhost&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;become&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;false&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Let the challenge be validated and retrieve the cert and intermediate certificate&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;community.crypto.acme_certificate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;account_key_src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/account_{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.key&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;account_email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.email&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.csr&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;cert&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.common_name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}.crt&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;fullchain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.domain[1:]&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}-fullchain.crt&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;chain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.basedir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.domain[1:]&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}-intermediate.crt&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;challenge&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;dns-01&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;acme_version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;2&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;acme_directory&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;acme_dir&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;remaining_days&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;60&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;terms_agreed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;true&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;cert_challenge&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Remove DNS challenge record on DO&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;community.digitalocean.digital_ocean_domain_record&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;absent&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;oauth_token&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;do_api_token&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;item.domain[1:]&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;TXT&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;cert_challenge.challenge_data[item.common_name][&amp;#39;dns-01&amp;#39;].record&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;|&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;replace(item.domain,&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;&amp;#39;)&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;cert_challenge.challenge_data[item.common_name][&amp;#39;dns-01&amp;#39;].resource_value&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;delegate_to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;localhost&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;become&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And finally, as part of host_vars, for each of my hosts a &lt;code&gt;letsencrypt.yml&lt;/code&gt; file exists containing:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="nt"&gt;le_certificates&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;common_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;myhost.example.com&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;basedir&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;/etc/letsencrypt&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;.example.com&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;security-team@example.com&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;To be fair, there could probably be a lot of optimization done in that playbook, and I can't remember why I did it with &lt;code&gt;.example.com&lt;/code&gt; (with the leading dot) and then use &lt;code&gt;item.domain[1:]&lt;/code&gt; in so many places. But, I'm a lazy IT person, and I'm not fixing what isn't inherently broken :)&lt;/p&gt;
&lt;p&gt;Hope this helps!&lt;/p&gt;
&lt;p&gt;M&lt;/p&gt;</content><category term="ansible"/><category term="ansible"/><category term="ssl"/><category term="letsencrypt"/><category term="web"/></entry><entry><title>Developing Ansible Automation content on Apple Silicon</title><link href="https://100things.wzzrd.com/2024/04/04/Developing-Ansible-Automation-Content-on-Apple-Silicon.html" rel="alternate"/><published>2024-04-04T17:22:00+02:00</published><updated>2024-04-04T17:22:00+02:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2024-04-04:/2024/04/04/Developing-Ansible-Automation-Content-on-Apple-Silicon.html</id><summary type="html">&lt;p&gt;I love Linux. Always have, always will. I run Linux (mostly RHEL and Fedora) on
a multitude of devices, from Raspberry Pi's to an old laptop functioning as a server,
and VMs on my NAS.&lt;/p&gt;
&lt;p&gt;But I have also ended up (long story) doing a lot of work on MacOS …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I love Linux. Always have, always will. I run Linux (mostly RHEL and Fedora) on
a multitude of devices, from Raspberry Pi's to an old laptop functioning as a server,
and VMs on my NAS.&lt;/p&gt;
&lt;p&gt;But I have also ended up (long story) doing a lot of work on MacOS with Apple silicon,
so I need a way to work on Ansible content from time to time, with a fast inner
development loop. Translated: I want a fast way to quickly test my Ansible "code" on
MacOS.&lt;/p&gt;
&lt;h2&gt;Roles and collections&lt;/h2&gt;
&lt;p&gt;I maintain a &lt;a href="https://galaxy.ansible.com/ui/namespaces/wzzrd/"&gt;modest set of
collections&lt;/a&gt;. Mostly for fun, but also
to understand the workflow of my customers (I'm part of the Red Hat automation sales
team). I have one for &lt;a href="https://github.com/go-gitea/gitea"&gt;Gitea&lt;/a&gt; and 
&lt;a href="https://gitea.com/gitea/act_runner"&gt;act_runner&lt;/a&gt;, I have one for
&lt;a href="https://atuin.sh/"&gt;atuin&lt;/a&gt; and I am working on one for &lt;a href="https://starship.rs/"&gt;starship&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As you might see, those current collections and any future ones I write, are aimed at
Linux machines, and RHEL in particular, either on x86_64 (amd64) or on aarch64 (arm64).&lt;/p&gt;
&lt;h2&gt;Writing roles and collections on MacOS&lt;/h2&gt;
&lt;p&gt;Writing a role or collection on MacOS is pretty easy. Whether you want to use VSCode,
vim or anything else, everything is available on MacOS (as it is on Linux). &lt;/p&gt;
&lt;p&gt;The tricky thing is to test the roles you write on MacOS on local Linux infrastructure,
and in particular to test the roles on multiple architectures with a reasonable amount
of speed. Especially that last part is hard. I have tried various things involving VMs
and containers with qemu, and though that functionally works, it is sloooooow. &lt;/p&gt;
&lt;h2&gt;Rosetta&lt;/h2&gt;
&lt;p&gt;Then I read up on Rosetta. &lt;a href="https://support.apple.com/en-us/102527"&gt;Rosetta&lt;/a&gt; is a binary
translator that makes it very fast and very convenient to run x86_64 software on an m1,
m2 or m3 aarch64 processor. It is FAST! It just wasn't very convenient to use when testing
roles on multiple architectures in VMs on MacOS.&lt;/p&gt;
&lt;h2&gt;Setting up the VM&lt;/h2&gt;
&lt;p&gt;What I wanted to have was an aarch64 Linux VM on MacOS, that allowed me to run x86_64
containers for molecule testing with Rosetta as a translation layer with as little
hassle as possible. (As said, I would have loved to use qemu for this, but it's just too
slow.)&lt;/p&gt;
&lt;p&gt;Basically, what you do is create a Lima VM on MacOS (that's the quickest), pass some
flags during creation to have it mount the Rosetta translation binary, and configure the
VM to invoke Rosetta whenever you execute an x86_64 binary.&lt;/p&gt;
&lt;p&gt;So first, let's create the VM:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;limactl&lt;span class="w"&gt; &lt;/span&gt;create&lt;span class="w"&gt; &lt;/span&gt;--containerd&lt;span class="w"&gt; &lt;/span&gt;none&lt;span class="w"&gt; &lt;/span&gt;--vm-type&lt;span class="w"&gt; &lt;/span&gt;vz&lt;span class="w"&gt; &lt;/span&gt;--rosetta&lt;span class="w"&gt; &lt;/span&gt;--name&lt;span class="w"&gt; &lt;/span&gt;fedora&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--mount-writable&lt;span class="w"&gt; &lt;/span&gt;template://fedora
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;Mounting and enabling Rosetta&lt;/h3&gt;
&lt;p&gt;Lima makes it easy to use Rosetta in the Linux VM. It's a matter of passing the
&lt;code&gt;--rosetta&lt;/code&gt; flag (as shown above) when creating a new machine. But in order to
automatically invoke Rosetta when we call an x86_64 binary, we need to do a couple of
things. &lt;/p&gt;
&lt;p&gt;First of all, we need to drop a small config file &lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt; as
&lt;code&gt;/usr/lib/binfmt.d/rosetta.conf&lt;/code&gt;.  This file tells the operating system to call Rosetta
when it tries to open a file with a certain set of &lt;a href="https://en.wikipedia.org/wiki/List_of_file_signatures"&gt;magic
bytes&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Then, we need to tweak the binfmt service itself a bit. When the binfmt service will
first start, it does so before the Rosetta share is mounted. Therefore, we tell it to
restart on failure after 5 seconds. Hardly a noticable delay and simple enough.  This is
achieved by a systemd drop-in:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[Service]&lt;/span&gt;
&lt;span class="na"&gt;ExecStartPre&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/usr/bin/test -f /mnt/lima-rosetta/rosetta&lt;/span&gt;
&lt;span class="na"&gt;RestartSec&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;5&lt;/span&gt;
&lt;span class="na"&gt;Restart&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;on-failure&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;SELinux&lt;/h3&gt;
&lt;p&gt;Because I run my tests on Fedora :heart, I needed to add some additional tasks to
configure the SELinux policy for Rosetta. Rosetta does not run out of the box on
a Fedora machine.  That is because Rosetta needs to be mounted over NFS and it seems to
need to be run from that location. I haven't researched this, but copying over the
Rosetta binary to the VMs filesystem didn't seem to work at all.&lt;/p&gt;
&lt;p&gt;Because the default SELinux policy disallows processes with &lt;code&gt;init_t&lt;/code&gt; to execute files
with an &lt;code&gt;nfs_t&lt;/code&gt; label, we have to teach SELinux that this is OK behaviour for now.&lt;/p&gt;
&lt;p&gt;The type enforcement file you will need for this, is as follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;rosetta&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m m-Double"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;init_t&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;nfs_t&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="kd"&gt;class&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;execute&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;open&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;read&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="o"&gt;============&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;init_t&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;==============&lt;/span&gt;

&lt;span class="nx"&gt;allow&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;init_t&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;nfs_t&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;execute&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;open&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;read&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;Docker&lt;/h3&gt;
&lt;p&gt;Yes, that's right. At the moment, my Ansible dev workflow uses Docker CE. I'm planning
on making it work with Docker, but in all honesty, it's still slightly easier to use
Docker for molecule than it is to use podman. Especially when you plan to run molecule
tests both locally, and as part of tests on GitHub.&lt;/p&gt;
&lt;h3&gt;Virtualenv&lt;/h3&gt;
&lt;p&gt;I like to keep anything I install through pip in virtualenvs. Makes it easier to test
updates and makes it easier to work with different versions of Python packages for
different use cases. My venv tool of choice is virtualenvwrapper.&lt;/p&gt;
&lt;p&gt;I just want to get that installed, and create a virtualenv with all my Ansible
dependencies in it, so I only have to log into my VM, run &lt;code&gt;workon ansible&lt;/code&gt; and start
doing whatever it is I need to do.&lt;/p&gt;
&lt;h2&gt;Making this quick and easy&lt;/h2&gt;
&lt;p&gt;I wrapped all of the above tasks in an Ansible playbook for my (and your) convenience.
You can find it on &lt;a href="https://github.com/wzzrd/ansible-dev-on-apple"&gt;GitHub&lt;/a&gt;. In order to
use it, you have to do six things:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install lima through your package manager of choice. I use brew, so I go &lt;code&gt;brew
   install lima&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Locally install Ansible on your Mac. I use a virtualenv for that, but since you are
   here, reading this, I assume you'll know how to do this&lt;/li&gt;
&lt;li&gt;Create a Fedora VM called "fedora" with limactl. &lt;/li&gt;
&lt;li&gt;Clone the repo from GitHub and cd to it&lt;/li&gt;
&lt;li&gt;Copy &lt;code&gt;inventory.tmpl&lt;/code&gt; to &lt;code&gt;inventory&lt;/code&gt; and update it with your username&lt;/li&gt;
&lt;li&gt;Run the playbook using &lt;code&gt;ansible-playbook setup.yml&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After that, you can navigate to the Ansible content you are working on on your Mac, and
simply run &lt;code&gt;limactl shell fedora&lt;/code&gt; to be dropped in the VM in the same directory. And
after running &lt;code&gt;workon ansible&lt;/code&gt;, you'll have all the Ansbile tools you need to start
working on your collection or role.&lt;/p&gt;
&lt;p&gt;Again, find the repo &lt;a href="https://github.com/wzzrd/ansible-dev-on-apple"&gt;here&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;Happy Ansible'ing!&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;I'm not pasting this file here, as it mostly contains the magic byte string, which
is quite ugly, and doesn't mean anything to most humans.&amp;#160;&lt;a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="ansible"/><category term="ansible"/><category term="linux"/><category term="macos"/></entry><entry><title>Sharing a set of Headphones between MacOS and Fedora</title><link href="https://100things.wzzrd.com/2023/05/04/Sharing-Headphones-Between-MacOS-And-Fedora.html" rel="alternate"/><published>2023-05-04T10:22:00+02:00</published><updated>2023-05-04T10:22:00+02:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2023-05-04:/2023/05/04/Sharing-Headphones-Between-MacOS-And-Fedora.html</id><summary type="html">&lt;h1&gt;Why share a set of headphones between MacOS and Fedora (or another Linux)?&lt;/h1&gt;
&lt;p&gt;Well, the answer to the 'why?' question is quite simple: because I dual boot between
MacOS and Fedora on my Mac Mini. This means in order to use the same pair of headphones
on MacOS and Fedora …&lt;/p&gt;</summary><content type="html">&lt;h1&gt;Why share a set of headphones between MacOS and Fedora (or another Linux)?&lt;/h1&gt;
&lt;p&gt;Well, the answer to the 'why?' question is quite simple: because I dual boot between
MacOS and Fedora on my Mac Mini. This means in order to use the same pair of headphones
on MacOS and Fedora, I need them to use the same key, so the headphones think they are
always connected to the same machine.&lt;/p&gt;
&lt;p&gt;There are a couple of loose posts on the internet, especially on
&lt;a href="https://askubuntu.com/questions/948417/how-can-i-use-the-same-bluetooth-keyboard-and-mouse-with-both-macos-and-ubuntu"&gt;Ask&lt;/a&gt;
&lt;a href="https://askubuntu.com/questions/991516/magic-mouse-and-apple-keyboard-on-ubuntu-macos-dual-boot/1382510#1382510"&gt;Ubuntu&lt;/a&gt;
about this topic already. I'm just combining those posts into a single blog for my own
reference and potentially preventing people from having to dig up information from
multiple places.&lt;/p&gt;
&lt;h1&gt;Background&lt;/h1&gt;
&lt;p&gt;Simply said, Bluetooth pairing works by exchanging a secret key between two devices.
Your operating systems (well, Linux anyway, but I assume MacOS does the same thing)
associated a key with both the Bluetooth address on the local machine as well as the
Bluetooth address of the remote device. Devices do the same thing. &lt;/p&gt;
&lt;p&gt;This means that there can only be a single key for each point to point connection in the
local Bluetooth "database". And if you pair a set of headphones with MacOS and then with
Linux, the key from the pairing with Linux will overwrite the key from the pairing with
MacOS.&lt;/p&gt;
&lt;p&gt;In other words, we have to make sure the pairing with both MacOS and Linux use the same
key.&lt;/p&gt;
&lt;h1&gt;Process&lt;/h1&gt;
&lt;p&gt;In order to share the Bluetooth key betwen MacOS and Fedora (or another Linux distro),
we follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Pair on Linux&lt;/li&gt;
&lt;li&gt;Reboot into MacOS&lt;/li&gt;
&lt;li&gt;Pair on MacOS&lt;/li&gt;
&lt;li&gt;Extract the Bluetooth key from MacOS&lt;/li&gt;
&lt;li&gt;Reboot into Linux&lt;/li&gt;
&lt;li&gt;Swap out the old - now obsolete - key for the one from MacOS&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Steps 1, 2 and 3&lt;/h2&gt;
&lt;p&gt;I'm not going to describe these in detail, as I'm assuming you know how this works :)&lt;/p&gt;
&lt;h2&gt;Step 4: extracting the Bluetooth key from MacOS&lt;/h2&gt;
&lt;p&gt;This is the crucial bit. On MacOS, open the Keychain app, and search for "bluetooth". As
you just paired the headphones, you are looking for the most recent entry called
"MobileBluetooth". &lt;/p&gt;
&lt;p&gt;Double click it. It will show you the Bluetooth address in the &lt;code&gt;Account&lt;/code&gt; field. Make
a note of both what is in the &lt;code&gt;Account&lt;/code&gt; field and what is in the &lt;code&gt;Show password&lt;/code&gt; field.
You might have to provide your password once or twice along the way.&lt;/p&gt;
&lt;p&gt;What is the the &lt;code&gt;Show password&lt;/code&gt; field will look something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;plist&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="na"&gt;version=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;dict&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;LinkKey&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;string&amp;gt;&lt;/span&gt;00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00&lt;span class="nt"&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;LinkKeyType&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;string&amp;gt;&lt;/span&gt;UnAuthenticated&lt;span class="nt"&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;LocalAddress&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;string&amp;gt;&lt;/span&gt;11:11:11:11:11:11&lt;span class="nt"&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/dict&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/plist&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The bit aboce that reads &lt;code&gt;00-00-00-00-[...]&lt;/code&gt; is your Bluetooth key. The bit that reads
&lt;code&gt;11:11:11:[...]&lt;/code&gt; is the Bluetooth address of your Bluetooth controller (i.e. the
Bluetooth address of your computer.&lt;/p&gt;
&lt;h2&gt;Step 5 and 6: reboot into Linux and swap out the key&lt;/h2&gt;
&lt;p&gt;Ok, now switch off your headphones for now, and make your sure you keep the note
somewhere you can access from Linux and reboot.&lt;/p&gt;
&lt;p&gt;Once rebooted into Linux, as root, go into &lt;code&gt;/var/lib/bluetooth/11:11:11:11:11:11&lt;/code&gt;.
Obviously swap out the &lt;code&gt;11:11:11:[...]&lt;/code&gt; string for the Bluetooth address of your
computer.&lt;/p&gt;
&lt;p&gt;In that directory, you'll find another directory that is named after the Bluetooth
address of your headphones. This is what was in the &lt;code&gt;Account&lt;/code&gt; field on MacOS. I'll use
&lt;code&gt;22:22:22:[...]&lt;/code&gt; in this example. Enter that directory. You are now in
&lt;code&gt;/var/lib/bluetooth/11:11:11:11:11:11/22:22:22:22:22:22&lt;/code&gt;. In that directory, there is
a file called &lt;code&gt;info&lt;/code&gt;. &lt;/p&gt;
&lt;p&gt;Edit the &lt;code&gt;info&lt;/code&gt; file. It'll look something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[General]&lt;/span&gt;
&lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;Your Awesome HEadphone&lt;/span&gt;
&lt;span class="na"&gt;Class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;0x240404&lt;/span&gt;
&lt;span class="na"&gt;AddressType&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;public&lt;/span&gt;
&lt;span class="na"&gt;SupportedTechnologies&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;BR/EDR&lt;/span&gt;&lt;span class="c1"&gt;;LE;&lt;/span&gt;
&lt;span class="na"&gt;Trusted&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="na"&gt;Blocked&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;false&lt;/span&gt;
&lt;span class="na"&gt;Services&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;[very long string here, shortened for readability]&lt;/span&gt;

&lt;span class="k"&gt;[DeviceID]&lt;/span&gt;
&lt;span class="na"&gt;Source&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;2&lt;/span&gt;
&lt;span class="na"&gt;Vendor&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;1999&lt;/span&gt;
&lt;span class="na"&gt;Product&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;3000&lt;/span&gt;
&lt;span class="na"&gt;Version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;1999&lt;/span&gt;

&lt;span class="k"&gt;[LinkKey]&lt;/span&gt;
&lt;span class="na"&gt;Key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;this_is_the_old_key&lt;/span&gt;
&lt;span class="na"&gt;Type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;4&lt;/span&gt;
&lt;span class="na"&gt;PINLength&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Remove the dashes from the &lt;code&gt;00-00-00-[...]&lt;/code&gt; string and paste it in the &lt;code&gt;Key&lt;/code&gt; field
above, where it says &lt;code&gt;this_is_the_old_key&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Save the file and run &lt;code&gt;systemctl restart bluetooth&lt;/code&gt;. Power on your headphones. Listen to
music.&lt;/p&gt;
&lt;p&gt;Hope this works as well for you as it did for me!!&lt;/p&gt;</content><category term="misc"/><category term="bluetooth"/><category term="linux"/><category term="macos"/><category term="hack"/></entry><entry><title>Using a GraphQL endpoint from an Ansible playbook</title><link href="https://100things.wzzrd.com/2022/09/28/Using-GraphQL-with-Ansible.html" rel="alternate"/><published>2022-09-28T13:50:25+02:00</published><updated>2022-09-28T13:50:25+02:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2022-09-28:/2022/09/28/Using-GraphQL-with-Ansible.html</id><summary type="html">&lt;h1&gt;Calling a GraphQL API from an Ansible playbook&lt;/h1&gt;
&lt;p&gt;I recently had to call a GraphQL API from an Ansible playbook, and considering I had
never done that before and there is little to no documentation about this online, it was
a bit tricky.&lt;/p&gt;
&lt;p&gt;In the end, I got everything working …&lt;/p&gt;</summary><content type="html">&lt;h1&gt;Calling a GraphQL API from an Ansible playbook&lt;/h1&gt;
&lt;p&gt;I recently had to call a GraphQL API from an Ansible playbook, and considering I had
never done that before and there is little to no documentation about this online, it was
a bit tricky.&lt;/p&gt;
&lt;p&gt;In the end, I got everything working, and figured I would share here for posterity (and
myself, when I have to do this again in the future!)&lt;/p&gt;
&lt;p&gt;A GraphQ API call consists of either one or two parts: the actual query or mutation and
optionally a set of variable as input to the query or mutation.&lt;/p&gt;
&lt;p&gt;I found it works easiest to drop both the query and the variables into separate files.
This allows me to edit them with appropriate syntax highlighting and formatting. The
variables are probably dynamic, so they are in a template. For simplicity, I put the
mutation (I was mutating, not querying) in a template file as well.&lt;/p&gt;
&lt;p&gt;Ok, so in the end, my mutation looked like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;mutation&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;createEventUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$createDto&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nc"&gt;EventUrlCreateInput&lt;/span&gt;&lt;span class="p"&gt;!)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;createEventUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;createDto&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$createDto&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;While the input variables looked like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;createDto&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;url&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;https://foo.bar.baz.9099/webhooks&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The Ansible task was called like this, with two lookups in the body: one for the
mutation itself (as "query") and one for the variables:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;test graphql&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.uri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;https://graphql.api.url.here/&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;POST&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;content-type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;application/json&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;body_format&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;json&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;lookup(&amp;quot;template&amp;quot;,&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;./templates/create_event_url.graphql&amp;quot;)&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;#39;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;variables&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;lookup(&amp;quot;template&amp;quot;,&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;./templates/create_event_url_variables.graphql&amp;quot;)&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;#39;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;connection&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;local&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This worked quite nicely for me, hope this helps!&lt;/p&gt;</content><category term="ansible"/><category term="ansible"/><category term="api"/><category term="graphql"/></entry><entry><title>Building a load balanced Ansible Tower cluster</title><link href="https://100things.wzzrd.com/2021/07/09/Loadbalanced-Ansible-Tower-Cluster.html" rel="alternate"/><published>2021-07-09T12:07:11+01:00</published><updated>2021-07-09T12:07:11+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2021-07-09:/2021/07/09/Loadbalanced-Ansible-Tower-Cluster.html</id><summary type="html">&lt;h1&gt;Load balancing Ansible Tower cluster&lt;/h1&gt;
&lt;p&gt;As you might know, I do a bit of YouTubing. One video request I got a couple of times,
was to do a video about clustering Ansible Tower behind a load balancer.&lt;/p&gt;
&lt;p&gt;As I had never done that before myself, it sounded interesting, so I …&lt;/p&gt;</summary><content type="html">&lt;h1&gt;Load balancing Ansible Tower cluster&lt;/h1&gt;
&lt;p&gt;As you might know, I do a bit of YouTubing. One video request I got a couple of times,
was to do a video about clustering Ansible Tower behind a load balancer.&lt;/p&gt;
&lt;p&gt;As I had never done that before myself, it sounded interesting, so I did it.&lt;/p&gt;
&lt;p _="%" kjkfn1VlTVE youtube&gt;Video is here:&lt;/p&gt;
&lt;p&gt;In the video, I use a playbook that I promised to put up somewhere, so here it is:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;configure Tower cluster&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;hosts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;tower&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;become&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;yes&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;vars&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;custom_config&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p p-Indicator"&gt;|&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="no"&gt;BROADCAST_WEBSOCKET_PROTOCOL = &amp;#39;http&amp;#39;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="no"&gt;BROADCAST_WEBSOCKET_PORT = 80&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="no"&gt;USE_X_FORWARDED_PORT = True&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="no"&gt;USE_X_FORWARDED_HOST = True&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;tower_base_url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;http://main.nontoonyt.lan&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;proxy_ip_allowed_list&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;192.168.122.8&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;remote_host_headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;HTTP_X_FORWARDED_FOR&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;REMOTE_ADDR&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;REMOTE_HOST&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;tower_username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;admin&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;tower_password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;redhat123&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c1"&gt;# https://access.redhat.com/solutions/5228651 and&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c1"&gt;# https://docs.ansible.com/ansible-tower/3.8.3/html/installandreference/proxy-support.html&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;drop in configuration file for web sockets over port 80&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.copy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;custom_config&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;dest&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;/etc/tower/conf.d/custom.py&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;0640&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;root&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;group&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;awx&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;notify&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;restart ansible-tower&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;configure tower remote host headers&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;ansible.tower.tower_settings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;REMOTE_HOST_HEADERS&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;remote_host_headers&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;tower_host&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;http://127.0.0.1&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;tower_username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;tower_username&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;tower_password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;tower_password&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;run_once&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;yes&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;configure proxy ip allowed list&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;ansible.tower.tower_settings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;PROXY_IP_ALLOWED_LIST&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;proxy_ip_allowed_list&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;tower_host&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;http://127.0.0.1&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;tower_username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;tower_username&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;tower_password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;tower_password&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;run_once&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;yes&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;configure tower base url&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;ansible.tower.tower_settings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;TOWER_URL_BASE&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;tower_base_url&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;tower_host&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;http://127.0.0.1&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;tower_username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;tower_username&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;tower_password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;tower_password&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;run_once&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;yes&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;handlers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;restart ansible-tower&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;ansible.builtin.service&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;ansible-tower&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;restarted&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Same goes for the haproxy configuration file I use to set this up:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;global&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;chroot&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;lib&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;haproxy&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;pidfile&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;haproxy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pid&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;haproxy&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="n"&gt;haproxy&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;daemon&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;tune&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ssl&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;default&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;dh&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;param&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2048&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c1"&gt;# turn on stats unix socket&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;stats&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;lib&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;haproxy&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;stats&lt;/span&gt;

&lt;span class="c1"&gt;#---------------------------------------------------------------------&lt;/span&gt;
&lt;span class="c1"&gt;# common defaults that all the &amp;#39;listen&amp;#39; and &amp;#39;backend&amp;#39; sections will&lt;/span&gt;
&lt;span class="c1"&gt;# use if not designated in their block&lt;/span&gt;
&lt;span class="c1"&gt;#---------------------------------------------------------------------&lt;/span&gt;
&lt;span class="n"&gt;defaults&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;mode&lt;/span&gt;&lt;span class="w"&gt;                    &lt;/span&gt;&lt;span class="n"&gt;http&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;option&lt;/span&gt;&lt;span class="w"&gt;                  &lt;/span&gt;&lt;span class="n"&gt;redispatch&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;option&lt;/span&gt;&lt;span class="w"&gt;                  &lt;/span&gt;&lt;span class="n"&gt;contstats&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;retries&lt;/span&gt;&lt;span class="w"&gt;                 &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;connect&lt;/span&gt;&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;option&lt;/span&gt;&lt;span class="w"&gt;                  &lt;/span&gt;&lt;span class="n"&gt;forwardfor&lt;/span&gt;

&lt;span class="c1"&gt;#---------------------------------------------------------------------&lt;/span&gt;

&lt;span class="n"&gt;listen&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;stats&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;bind&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;9000&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;mode&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;http&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;option&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;forwardfor&lt;/span&gt;&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="n"&gt;except&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;127.0&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;0.0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;stats&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;enable&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;stats&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;uri&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;stats&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;refresh&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;

&lt;span class="n"&gt;frontend&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;tower_fe&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;bind&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;443&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ssl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;crt&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;etc&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;haproxy&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;haproxy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pem&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;default_backend&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;tower_be&lt;/span&gt;

&lt;span class="n"&gt;backend&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;tower_be&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;balance&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;roundrobin&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;tower1_http&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;192.168&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;122.161&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;maxconn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;check&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;tower2_http&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;192.168&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;122.201&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;maxconn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;check&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;tower3_http&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;192.168&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;122.144&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;maxconn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;check&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;tower4_http&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;192.168&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;122.80&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;maxconn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;check&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;tower5_http&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;192.168&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;122.89&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;maxconn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;check&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you do this installation, make sure you initiate the Tower installation with:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;./setup.sh&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;nginx_disable_https&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--&lt;span class="w"&gt; &lt;/span&gt;-b
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Check out the video if you want to learn more!&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;</content><category term="ansible"/><category term="ansible"/><category term="ansible tower"/><category term="clustering"/><category term="load balancing"/></entry><entry><title>Fish, bash, zsh</title><link href="https://100things.wzzrd.com/2021/07/08/Fish-Bash.html" rel="alternate"/><published>2021-07-08T12:04:11+01:00</published><updated>2021-07-08T12:04:11+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2021-07-08:/2021/07/08/Fish-Bash.html</id><summary type="html">&lt;h1&gt;Fish, bash, zsh&lt;/h1&gt;
&lt;p&gt;Over the last year, I've been using fish as my shell on Linux.  Before that, I have
tried both zsh (with and without oh-my-zsh) and bash. For bash, I wrote my own
configuration framework, which - let's be real - everyone needs to do and probably has
done at …&lt;/p&gt;</summary><content type="html">&lt;h1&gt;Fish, bash, zsh&lt;/h1&gt;
&lt;p&gt;Over the last year, I've been using fish as my shell on Linux.  Before that, I have
tried both zsh (with and without oh-my-zsh) and bash. For bash, I wrote my own
configuration framework, which - let's be real - everyone needs to do and probably has
done at some point.&lt;/p&gt;
&lt;p&gt;Last week, I decided to switch back from fish to bash. This blog is the story why I did
that and what I'm using now. I might look into zsh again at some point, but not now.&lt;/p&gt;
&lt;h1&gt;Fish&lt;/h1&gt;
&lt;p&gt;Fish. I like fish. Fish shell is a great shell. It really is. I love the frameworks that
exist for it, like omf, and I love some of the features is offers. I'll talk about those
first, because that's what switching shells is generally all about, right? ;)&lt;/p&gt;
&lt;h2&gt;Fish features&lt;/h2&gt;
&lt;h3&gt;The good&lt;/h3&gt;
&lt;p&gt;I'll talk about abbreviations, named function arguments, variable scoping, and the help
mechanism.&lt;/p&gt;
&lt;p&gt;Let's start with &lt;em&gt;abbreviations&lt;/em&gt;. In bash, you have functions and aliases. Functions are
functions, and aliases are a shortened version of a (series of) command(s). The fish
concept of abbreviations is like an alias, but instead of you entering an alias and the
shell invisibly executing the aliased command(s), an abbreviation shows you the command
it expands to when you hit space or enter. &lt;/p&gt;
&lt;p&gt;This means you can abbreviate long bits of code you need to use regularly, and always
see the command you are executing on screen, which is great for understanding and from
a security perspective.&lt;/p&gt;
&lt;p&gt;Another great feature of fish is &lt;em&gt;named function arguments&lt;/em&gt;. When you define a function
in bash or sh, you use something like (I know the &lt;code&gt;function&lt;/code&gt; keyword is optional
/ non-canonical, but I like using it for clarity):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;myfunction&lt;span class="o"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;the result: &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The above function might take or might not take any arguments. From the signature of the
function, we cannot tell. Enter fish. In fish you would use:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;myfunction&lt;span class="w"&gt; &lt;/span&gt;-a&lt;span class="w"&gt; &lt;/span&gt;result
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;the result: &lt;/span&gt;&lt;span class="nv"&gt;$result&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;As you can see, the way fish handles defining that function is much clearer to a reader
of the code, as the argument to the function is now named &lt;code&gt;$result&lt;/code&gt;, not &lt;code&gt;$1&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You can also have fish add a description to a function with the &lt;code&gt;-d&lt;/code&gt; flag, or trigger it
when a variable changes with &lt;code&gt;-v&lt;/code&gt;. Awesome features.&lt;/p&gt;
&lt;p&gt;Anyway, on to &lt;em&gt;variable scoping&lt;/em&gt;. Bash has variables that are local (which are local to
their block), as indicated by the &lt;code&gt;local&lt;/code&gt; keyword, and the rest. Any variable that is
not local in Bash is therefore scoped to the current shell context (either your current
interactive shell or a script). This is all ok, and we've been doing this for year,
except that the &lt;code&gt;local&lt;/code&gt; keyword is a bashism, I think, but whatever.&lt;/p&gt;
&lt;p&gt;Fish has more scopes. In fish, a variable can be local, like in bash, it can be global,
or they can be universal. A universal variable is shared between fish instances of the
same user, which can be quite convenient. &lt;/p&gt;
&lt;p&gt;While &lt;a href="https://fishshell.com/docs/current/cmds/set.html"&gt;setting variables&lt;/a&gt; in fish, you
can also tell the variable to be exported, treated as a path variable and much more. The
downside of this all is the required usage of the &lt;code&gt;set&lt;/code&gt; keyword for any variable
operations. I'll come back to why that is a nuisance later.&lt;/p&gt;
&lt;p&gt;Finally, let's talk about the &lt;em&gt;fish help mechasim&lt;/em&gt;. In bash, when you want to learn
about a built-in command, you call &lt;code&gt;help for&lt;/code&gt; and bash will give you&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;help&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;NAME&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;WORDS&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;COMMANDS&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;done&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;Execute&lt;span class="w"&gt; &lt;/span&gt;commands&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;each&lt;span class="w"&gt; &lt;/span&gt;member&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;a&lt;span class="w"&gt; &lt;/span&gt;list.

&lt;span class="w"&gt;    &lt;/span&gt;The&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39; loop executes a sequence of commands for each member in a&lt;/span&gt;
&lt;span class="s1"&gt;    list of items.  If `in WORDS ...;&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;not&lt;span class="w"&gt; &lt;/span&gt;present,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$@&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;is
&lt;span class="w"&gt;    &lt;/span&gt;assumed.&lt;span class="w"&gt;  &lt;/span&gt;For&lt;span class="w"&gt; &lt;/span&gt;each&lt;span class="w"&gt; &lt;/span&gt;element&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;WORDS,&lt;span class="w"&gt; &lt;/span&gt;NAME&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;that&lt;span class="w"&gt; &lt;/span&gt;element,&lt;span class="w"&gt; &lt;/span&gt;and
&lt;span class="w"&gt;    &lt;/span&gt;the&lt;span class="w"&gt; &lt;/span&gt;COMMANDS&lt;span class="w"&gt; &lt;/span&gt;are&lt;span class="w"&gt; &lt;/span&gt;executed.

&lt;span class="w"&gt;    &lt;/span&gt;Exit&lt;span class="w"&gt; &lt;/span&gt;Status:
&lt;span class="w"&gt;    &lt;/span&gt;Returns&lt;span class="w"&gt; &lt;/span&gt;the&lt;span class="w"&gt; &lt;/span&gt;status&lt;span class="w"&gt; &lt;/span&gt;of&lt;span class="w"&gt; &lt;/span&gt;the&lt;span class="w"&gt; &lt;/span&gt;last&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;command&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;executed.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In fish, running &lt;code&gt;help for&lt;/code&gt; will open a local copy of the fish docs on your browser,
allowing for a much better reading experience, links to other commands and much more.
Really nice.&lt;/p&gt;
&lt;p&gt;But now for the bad.&lt;/p&gt;
&lt;h3&gt;The bad&lt;/h3&gt;
&lt;p&gt;Ok, so what's bad. Bash / sh &lt;em&gt;incompatibility&lt;/em&gt; is bad. When running demos or tutorials,
what is generally provided is bash commands. Some will work, but especially the ones
where variables are set, will not. Truly frustrating sometimes. Dropping into a bash
shell works, but then the commands will be part of my bash history, not my fish history,
so I'll need to remember what history a certain command will be in. Annoying.&lt;/p&gt;
&lt;p&gt;There are some plugins for omf (a fish config framework) that aim to mimic the bash
experience around setting the &lt;code&gt;$PATH&lt;/code&gt; variable, mainly, but you'll end up with a weird
config and having to work around fish when running a tutorial. &lt;/p&gt;
&lt;p&gt;This is the (big) downside of the variable scoping bit I talked about above.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;$PATH&lt;/code&gt; variable on fish is both an awesome and an aweful thing. It's awesome
because fish allows you to prepend another variable to it, &lt;code&gt;$fish_users_paths&lt;/code&gt;, in order
to prevent having to override &lt;code&gt;$PATH&lt;/code&gt; itself. You can add directories to
&lt;code&gt;$fish_users_paths&lt;/code&gt; with the &lt;code&gt;fish_add_path&lt;/code&gt; command. Per directory, you'll only ever
run that once, since it manipulates a universal variable, and universal variables are
saved between session.&lt;/p&gt;
&lt;p&gt;I don't think there is a &lt;code&gt;fish_remove_path&lt;/code&gt; function though, so removing a directory
from your path requires you to dig into &lt;code&gt;~/.config/fish_variables&lt;/code&gt; manually.&lt;/p&gt;
&lt;p&gt;Another thing I do not like in the above examples, is that fish does not allow you to do
&lt;code&gt;${result}&lt;/code&gt;. That is considered a syntax error. Over the years, I made a habit of
wrapping all my variables in curly braces to be consistent through my code and prevent
ambiguity with variable names. Fish would require me to do &lt;code&gt;{$result}&lt;/code&gt; instead of
&lt;code&gt;${result}&lt;/code&gt;, which looks weird.  This is trivial though :)&lt;/p&gt;
&lt;p&gt;As a final example of things I do not like: completions. Not really fish's fauly. Fish
has awesome ones, like bash and zsh do. Problem is, neither of the three can read the
completion format of the others. Or at least fish cannot read bash or zsh completions,
and there simply are less completions for fish.  This means that completions for pretty
important binaries, like, for example, oh, I don't know, &lt;code&gt;kubectl&lt;/code&gt; might not be
supported for fish. This situation is improving, but it's far from perfect.&lt;/p&gt;
&lt;p&gt;My biggest problem is with following tutorials and howtos though. This was the ultimate
reason I switched back&lt;/p&gt;
&lt;h2&gt;Config framework&lt;/h2&gt;
&lt;p&gt;Any decent Linux person has written some kind of bash / shell configuration framework at
some point, amirite?&lt;/p&gt;
&lt;p&gt;So did I, years ago. I just revived it from my personal gitea server and improved it
a bit. I might open that repo up soon, just for fun.&lt;/p&gt;
&lt;p&gt;I know that there are a ton of bash config frameworks, like oh-my-bash, out there, but
I think my philosophy here is a bit different.&lt;/p&gt;
&lt;h3&gt;bashrc.d&lt;/h3&gt;
&lt;p&gt;I called my framework bashrc.d a long time ago, and it'll probably still be called that
when I open it up.&lt;/p&gt;
&lt;p&gt;My idea is as follows. It's simple. I do not need a million plugins that provide 'handy'
aliases that I do not know exist, that I do not understand, that are not applicable to
me and might, in fact, be harmful.&lt;/p&gt;
&lt;p&gt;No plugins with aliases.&lt;/p&gt;
&lt;p&gt;If I add a plugin to bashrc.d, it is because the plugin provides me with some
functionality that is otherwise missing. As an example, I have a plugin with a bunch of
functions to set, view and unset a number of (free) 1GiB huge pages on Linux. (I use
them for virtualization performance.) That's functionality that's hard to do in an alias
and quite useful, potentially also for others.&lt;/p&gt;
&lt;p&gt;Bashrc.d has a help system for plugins as well, so you can not only enable and disable
them through a cli, but also view some help on what they do and what they provide.&lt;/p&gt;
&lt;p&gt;No plugins without built-in help.&lt;/p&gt;
&lt;p&gt;As another example, I have a plugin that helps with the generation of SSL certificates
and keys and viewing their properties, complete with docs. I think that is useful.&lt;/p&gt;
&lt;p&gt;I will however not add any huge lists of aliases for all kinds of things. Aliases are
mainly a personal preference if you ask me, unless we are talking about really commonly
used ones, like &lt;code&gt;kc&lt;/code&gt; for &lt;code&gt;kubectl&lt;/code&gt;. Maybe. Huge lists of aliases in different plugins
are also bound to start conflicting at some point.&lt;/p&gt;
&lt;p&gt;This is why I stopped using all the other frameworks to begin with. I don't need someone
else's aliases. They'll never become real muscle memory anyway.&lt;/p&gt;
&lt;p&gt;Aliases go into &lt;code&gt;local_settings.sh&lt;/code&gt; in bashrc.d. Aliases are yours. Not mine.&lt;/p&gt;
&lt;p&gt;I like shell configuration frameworks that offer functions to do useful things. Cosmetic
plugins, easy to install completions for tools.&lt;/p&gt;
&lt;p&gt;And I suffer from NIH really, really bad :D&lt;/p&gt;</content><category term="misc"/><category term="fedora"/><category term="rhel"/><category term="shell"/><category term="fish"/><category term="bash"/><category term="zsh"/><category term="configuration"/></entry><entry><title>Using proper FreeIPA certificates on Cockpit</title><link href="https://100things.wzzrd.com/2021/06/10/Proper-SSL-certs-in-cockpit.html" rel="alternate"/><published>2021-06-10T17:39:11+01:00</published><updated>2021-06-10T17:39:11+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2021-06-10:/2021/06/10/Proper-SSL-certs-in-cockpit.html</id><summary type="html">&lt;h1&gt;Cockpit and FreeIPA&lt;/h1&gt;
&lt;p&gt;A couple of years ago, I did a &lt;a href="https://www.youtube.com/watch?v=1R0xPsefu1s"&gt;video&lt;/a&gt; on
Youtube on using FreeIPA / IdM certificates in Cockpit. According to some comments (that
I only saw way after the fact...), for some people, my way of doing that didn't work.&lt;/p&gt;
&lt;p&gt;Therefore, I redid the video for RHEL7 …&lt;/p&gt;</summary><content type="html">&lt;h1&gt;Cockpit and FreeIPA&lt;/h1&gt;
&lt;p&gt;A couple of years ago, I did a &lt;a href="https://www.youtube.com/watch?v=1R0xPsefu1s"&gt;video&lt;/a&gt; on
Youtube on using FreeIPA / IdM certificates in Cockpit. According to some comments (that
I only saw way after the fact...), for some people, my way of doing that didn't work.&lt;/p&gt;
&lt;p&gt;Therefore, I redid the video for RHEL7 and RHEL8, connected to IdM from RHEL8. This
should work with recent Fedora as well, since I'm using that at home :)&lt;/p&gt;
&lt;h1&gt;How it works&lt;/h1&gt;
&lt;h2&gt;#SELinux&lt;/h2&gt;
&lt;p&gt;Both on RHEL7 and RHEL8, the certmonger process that is actually "in charge" of getting
the certificates, cannot write to &lt;code&gt;/etc/cockpit/ws-certs.d&lt;/code&gt; due to SELinux. Therefore,
before we tell it to go fetch certificates through &lt;code&gt;ipa-getcert&lt;/code&gt;, we need to tweak
SELinux a bit.&lt;/p&gt;
&lt;p&gt;The following command works on RHEL7, RHEL8 and recent Fedora and relabels
&lt;code&gt;/etc/cockpit/ws-certs.d&lt;/code&gt; to &lt;code&gt;certs_t&lt;/code&gt; instead of &lt;code&gt;etc_t&lt;/code&gt;. This makes it possible for
certmonger to write there.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;semanage fcontext -a -t cert_t &amp;quot;/etc/cockpit/ws-certs.d(/.*)?&amp;quot;
restorecon -FvR /etc/cockpit/ws-certs.d
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;RHEL7&lt;/h2&gt;
&lt;p&gt;On RHEL7, cockpit expects a combined file for the certificate and key information, so we
need to concatenate what we get from certmonger before we give to cockpit.&lt;/p&gt;
&lt;p&gt;We can pass &lt;code&gt;ipa-getcert&lt;/code&gt; a post-save command, that is issued after storing the
certificate, but that can be only a single command. Therefore we use a script:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;

cat&lt;span class="w"&gt; &lt;/span&gt;/etc/pki/tls/certs/&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;.cert&lt;span class="w"&gt; &lt;/span&gt;/etc/pki/tls/private/&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;.key&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;/etc/cockpit/ws-certs.d/50-&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;.cert
chown&lt;span class="w"&gt; &lt;/span&gt;root:cockpit-ws&lt;span class="w"&gt; &lt;/span&gt;/etc/cockpit/ws-certs.d/50-&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;.cert
chmod&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;0640&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/etc/cockpit/ws-certs.d/50-&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;.cert
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;After we issue that command, we can request the certificate:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ipa-getcert request -f /etc/pki/tls/certs/$(hostname -f).cert -k /etc/pki/tls/private/$(hostname -f).key -D $(hostname -f) -C &amp;quot;/usr/local/sbin/cockpit_certs.sh $(hostname -f)&amp;quot; -K host/$(hostname -f)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This should result in a certificate in &lt;code&gt;/etc/cockpit/ws-certs.d&lt;/code&gt; that we'll never have
to touch again :)&lt;/p&gt;
&lt;h2&gt;RHEL8&lt;/h2&gt;
&lt;p&gt;On RHEL8 and recent Fedora, we don't need a script to concatenate the key and the
certificate, because recent cockpit can handle two separate files for them.&lt;/p&gt;
&lt;p&gt;Therefore, we only have to issue the &lt;code&gt;ipa-getcert&lt;/code&gt; command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ipa-getcert request -f /etc/cockpit/ws-certs.d/$(hostname -f).cert -k /etc/cockpit/ws-certs.d/$(hostname -f).key -D $(hostname -f) -K host/$(hostname -f) -m 0640  -o root:cockpit-ws -O root:root -M 0644
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This again should result in a certificate that we'll never have to touch again until we
decommission this machine!&lt;/p&gt;
&lt;p&gt;Hope this helps!&lt;/p&gt;
&lt;p&gt;{% youtube W26rWtEqToc %}&lt;/p&gt;</content><category term="misc"/><category term="fedora"/><category term="selinux"/><category term="rhel"/><category term="cockpit"/><category term="freeipa"/><category term="idm"/></entry><entry><title>Wrong colors with Solarized theme in shell</title><link href="https://100things.wzzrd.com/2021/02/15/wrong-colors-solarized.html" rel="alternate"/><published>2021-02-15T10:39:11+01:00</published><updated>2021-02-15T10:39:11+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2021-02-15:/2021/02/15/wrong-colors-solarized.html</id><summary type="html">&lt;h1&gt;Solarized colors&lt;/h1&gt;
&lt;p&gt;I like Solarized, but every now and then, I switch to a different theme just to check it
out. Eventually, I'll go back to Solarized, and run into the same problem over and over:&lt;/p&gt;
&lt;p&gt;I'll end up having this&lt;/p&gt;
&lt;p&gt;&lt;img alt="Terminal with wrong colors" src="/images/wrong_colors.png"&gt;&lt;/p&gt;
&lt;p&gt;Instead of this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Terminal with right colors" src="/images/right_colors.png"&gt;&lt;/p&gt;
&lt;p&gt;Meaning a lot of the colors …&lt;/p&gt;</summary><content type="html">&lt;h1&gt;Solarized colors&lt;/h1&gt;
&lt;p&gt;I like Solarized, but every now and then, I switch to a different theme just to check it
out. Eventually, I'll go back to Solarized, and run into the same problem over and over:&lt;/p&gt;
&lt;p&gt;I'll end up having this&lt;/p&gt;
&lt;p&gt;&lt;img alt="Terminal with wrong colors" src="/images/wrong_colors.png"&gt;&lt;/p&gt;
&lt;p&gt;Instead of this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Terminal with right colors" src="/images/right_colors.png"&gt;&lt;/p&gt;
&lt;p&gt;Meaning a lot of the colors will show up as bland grey. Yuck.&lt;/p&gt;
&lt;p&gt;The simple solution for this is to go into the preferences panel of your shell, like
gnome-terminal, or - in my case - Tilix, and &lt;strong&gt;un&lt;/strong&gt;check the &lt;code&gt;Show bold text in bright
colors&lt;/code&gt; checkbox:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Gnome-terminal settings" src="/images/tilix_panel.png"&gt;&lt;/p&gt;
&lt;p&gt;Much better :)&lt;/p&gt;</content><category term="misc"/><category term="shell"/><category term="colors"/><category term="solarized"/><category term="fedora"/></entry><entry><title>Ventoy, multiboot DVD creator</title><link href="https://100things.wzzrd.com/2021/02/04/ventoy.html" rel="alternate"/><published>2021-02-04T13:34:09+01:00</published><updated>2021-02-04T13:34:09+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2021-02-04:/2021/02/04/ventoy.html</id><summary type="html">&lt;h1&gt;Installer USB drives&lt;/h1&gt;
&lt;p&gt;Quick blog.&lt;/p&gt;
&lt;p&gt;The other day, I was looking for a tool to create a USB drive with multiple installer
ISOs on it. Mainly, I needed a Fedora installer DVD (for my laptop, to make the switch
to btrfs), and a Red Hat Enterprise Linux 8.3 DVD …&lt;/p&gt;</summary><content type="html">&lt;h1&gt;Installer USB drives&lt;/h1&gt;
&lt;p&gt;Quick blog.&lt;/p&gt;
&lt;p&gt;The other day, I was looking for a tool to create a USB drive with multiple installer
ISOs on it. Mainly, I needed a Fedora installer DVD (for my laptop, to make the switch
to btrfs), and a Red Hat Enterprise Linux 8.3 DVD to reinstall my dad's workstation
(which currently runs CentOS 8, and is in need of actual RHEL).&lt;/p&gt;
&lt;p&gt;There used to be a tool called Yumi to do this with, but their site is dead, and so is
multiboot.org. I'm not even going to bother linking to them :/&lt;/p&gt;
&lt;p&gt;Then, on some forum about multiboot DVDs, I read that their demise might have to do with
something called "&lt;a href="https://www.ventoy.net"&gt;ventoy&lt;/a&gt;", which is being actively maintained
and would make both obsolete. Or so they say.&lt;/p&gt;
&lt;p&gt;Needless to say, I was intregued. &lt;/p&gt;
&lt;h1&gt;Ventoy&lt;/h1&gt;
&lt;p&gt;It was even better than I hoped. In ye olde days, the way I remember multiboot DVD
creators worked, was to extract the contents of installer DVDs onto a USB drive, and
slap some fairly fragile syslinux magic in front of it. From what I remember, this only
worked with Linux and other *nix like operating systems (no Windows), but I could be
wrong.&lt;/p&gt;
&lt;p&gt;Ventoy does it completely differently. You run a script to prepare your USB device,
which partitions it and installs a bootloader, and after that, litteraly the only thing
you need to do is drop ISO files onto your USB disk. That's it.&lt;/p&gt;
&lt;p&gt;After that, you can unplug it. You are now done.&lt;/p&gt;
&lt;h2&gt;Installing machines&lt;/h2&gt;
&lt;p&gt;Next, you fire up the machine you need to install, and hit F12 or whatever to make the
boot menu pop up. Select your USB drive (which you have inserted into the machine), and
wait for a few seconds. You should see a grub-like menu that allows you to pick one of
the ISOs and boot from it to install your machine:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Very plain ventoy boot menu" src="/images/plain_ventoy.png"&gt;&lt;/p&gt;
&lt;p&gt;As you can see, I have mine set up with Fedora, CentOS Stream 8, RHEL8 and even good old
Windows 10. In order to not have to pick an ISO filename but a human-friendly 
description, you can drop a tiny &lt;code&gt;ventoy.json&lt;/code&gt; file like below into a directory called
&lt;code&gt;ventoy&lt;/code&gt; containing something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;menu_alias&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;image&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/archlinux-2021.01.01-x86_64.iso&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;alias&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;ArchLinux 2021.01.01&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;image&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/CentOS-Stream-8-x86_64-20210126-dvd1.iso&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;alias&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;CentOS Stream 8 (20210126)&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;image&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/debian-10.7.0-amd64-DVD-1.iso&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;alias&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Debian 10.7.0 (Buster)&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;image&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/Fedora-Workstation-Live-x86_64-33-1.2.iso&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;alias&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Fedora 33 Workstation&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;image&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/rhel-8.3-x86_64-dvd.iso&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;alias&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Red Hat Enterprise Linux 8.3&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;image&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/systemrescue-7.01-amd64.iso&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;alias&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;System Rescue 7.01&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;image&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/ubuntu-20.10-desktop-amd64.iso&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;alias&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Ubuntu Desktop 20.10&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;image&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/Win10_1709_EnglishInternational_x64.iso&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;alias&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Windows 10 installer&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The above json makes the menu item for &lt;code&gt;rhel-8.3-x86_64-dvd.iso&lt;/code&gt; show up as &lt;code&gt;Red Hat
Enterprise Linux 8.3&lt;/code&gt;, which is much better (and you can get it for free these days, did
you
&lt;a href="https://www.redhat.com/en/blog/new-year-new-red-hat-enterprise-linux-programs-easier-ways-access-rhel"&gt;know&lt;/a&gt;?)&lt;/p&gt;
&lt;h2&gt;Plugins&lt;/h2&gt;
&lt;p&gt;There are more plugins to configure. For example to add icons to your menu (like the
Fedora logo for the Fedora DVD, or the Red Hat logo for the Red Hat ISO). It is also
possible to add a raw image file containing an operating system and boot that, if
I understand corractly. Haven't tried that yet
though.&lt;/p&gt;
&lt;p&gt;With the change we made above, my Ventoy menu now looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="My Ventoy boot menu" src="/images/ventoy.png"&gt;&lt;/p&gt;
&lt;p&gt;With the additional menu_class and theme plugins and a little configuration, my menu
looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="My Ventoy boot menu with icons" src="/images/ventoy_icons.png"&gt;&lt;/p&gt;
&lt;p&gt;Crowded, but nice ;)&lt;/p&gt;
&lt;p&gt;To do this, you need to copy over the &lt;code&gt;theme&lt;/code&gt; directory in the ventoy tarball onto your
USB drive into the &lt;code&gt;ventoy&lt;/code&gt; directory. Ventoy does not ship with all the icons I use, so
you'll have to spend some cycles googling for them (I'm not sure if I can redistribute
them, so I won't take the risk there). Just drop them into the &lt;code&gt;/ventoy/theme/icons&lt;/code&gt;
directory.&lt;/p&gt;
&lt;p&gt;You have to call the Ubuntu logo &lt;code&gt;ubuntu.png&lt;/code&gt;, the Windows logo &lt;code&gt;windows.png&lt;/code&gt;, etc., and
use the json below as &lt;code&gt;ventoy.json&lt;/code&gt;. This has to do with the way the menu_class plugin
works. I'll refer to their docs if you want to know more.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;theme&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;file&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/ventoy/theme/theme.txt&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;display_mode&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;GUI&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;ventoy_left&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;5%&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;ventoy_top&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;95%&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;ventoy_color&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;#0000ff&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;menu_alias&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;image&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/archlinux-2021.01.01-x86_64.iso&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;alias&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;ArchLinux 2021.01.01&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;image&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/CentOS-Stream-8-x86_64-20210126-dvd1.iso&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;alias&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;CentOS Stream 8 (20210126)&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;image&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/debian-10.7.0-amd64-DVD-1.iso&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;alias&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Debian 10.7.0 (Buster)&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;image&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/Fedora-Workstation-Live-x86_64-33-1.2.iso&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;alias&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Fedora 33 Workstation&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;image&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/rhel-8.3-x86_64-dvd.iso&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;alias&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Red Hat Enterprise Linux 8.3&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;image&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/systemrescue-7.01-amd64.iso&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;alias&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;System Rescue 7.01&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;image&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/ubuntu-20.10-desktop-amd64.iso&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;alias&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Ubuntu Desktop 20.10&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;image&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/Win10_1709_EnglishInternational_x64.iso&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;alias&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Windows 10 installer&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;menu_class&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;key&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;ubuntu&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;class&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;ubuntu&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;key&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;arch&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;class&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;arch&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;key&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;rhel&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;class&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;red-hat&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;key&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Fedora&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;class&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;fedora&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;key&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;debian&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;class&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;debian&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;key&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;CentOS&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;class&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;centos&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;key&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Win&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;class&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;windows&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;key&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;rescue&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;class&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;rescue&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Note you have to specify a &lt;code&gt;theme&lt;/code&gt; in &lt;code&gt;ventoy.json&lt;/code&gt; in order to make the icons work.&lt;/p&gt;
&lt;h2&gt;Next?&lt;/h2&gt;
&lt;h3&gt;Packaging?&lt;/h3&gt;
&lt;p&gt;This tool is actually so useful, I might actually package it, but I'm not 100% sure what
the best way to do that would be: the delivery as a tarball containing all required
pieces is a bit odd.&lt;/p&gt;
&lt;p&gt;Maybe. Who knows.&lt;/p&gt;
&lt;h2&gt;Translation?&lt;/h2&gt;
&lt;p&gt;Some of the error messages ventoy provides you with are in Chinese. I might take a shot
at translating some bits (not that I speak any Chinese, but Google Translate does).&lt;/p&gt;
&lt;p&gt;Anyway, have fun!&lt;/p&gt;</content><category term="misc"/><category term="boot"/><category term="install"/><category term="multiboot"/><category term="dvd"/><category term="fedora"/></entry><entry><title>Shut up, auditd!</title><link href="https://100things.wzzrd.com/2021/01/11/Shut-Up-Audit.html" rel="alternate"/><published>2021-01-11T11:24:20+01:00</published><updated>2021-01-11T11:24:20+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2021-01-11:/2021/01/11/Shut-Up-Audit.html</id><summary type="html">&lt;h1&gt;Audit logging&lt;/h1&gt;
&lt;p&gt;(Happy 2021, may it be better than 2020!)&lt;/p&gt;
&lt;p&gt;On my tiny, Raspberry Pi based Fedora systems, I have &lt;em&gt;a lot&lt;/em&gt; of audit messages in my
journal. And I mean a lot, I mean like over 50,000 over the course of 9 days. That's
over 5,500 per …&lt;/p&gt;</summary><content type="html">&lt;h1&gt;Audit logging&lt;/h1&gt;
&lt;p&gt;(Happy 2021, may it be better than 2020!)&lt;/p&gt;
&lt;p&gt;On my tiny, Raspberry Pi based Fedora systems, I have &lt;em&gt;a lot&lt;/em&gt; of audit messages in my
journal. And I mean a lot, I mean like over 50,000 over the course of 9 days. That's
over 5,500 per day. Or, to put it plainly: too many.&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nx"&gt;Jan&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;02&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;31&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lan&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;audit&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SERVICE_STOP&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;uid&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;auid&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;4294967295&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ses&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;4294967295&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;subj&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;system_u&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;system_r&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;init_t&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;s0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="nx"&gt;unit&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;someunit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;comm&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;systemd&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;exe&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;/usr/lib/systemd/systemd&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;hostname&lt;/span&gt;&lt;span class="p"&gt;=?&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;addr&lt;/span&gt;&lt;span class="p"&gt;=?&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;te&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="nx"&gt;Jan&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;02&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;51&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lan&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;audit&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;471147&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;CRYPTO_KEY_USER&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;471147&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;uid&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;auid&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;4294967295&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ses&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;4294967295&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;subj&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;system_u&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;system_r&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;sshd_t&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;s0&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;s0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;c0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;c1023&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="nx"&gt;op&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;destroy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;fp&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;SHA256&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;77&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;39&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;df&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="nx"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;
&lt;span class="nx"&gt;Jan&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;02&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;51&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lan&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;audit&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;471147&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;USER_LOGIN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;471147&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;uid&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;auid&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;4294967295&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ses&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;4294967295&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;subj&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;system_u&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;system_r&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;sshd_t&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;s0&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;s0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;c0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;c1023&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="nx"&gt;op&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;login&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;acct&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;(unknown)&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;exe&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;/usr/sbin/sshd&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;hostname&lt;/span&gt;&lt;span class="p"&gt;=?&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ad&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;These logs take up space and consume resources that are scarse on a Raspberry Pi.
Therefore, I set off to disable them.&lt;/p&gt;
&lt;h2&gt;/etc/systemd/journald.conf&lt;/h2&gt;
&lt;p&gt;The first thing I tried is setting &lt;code&gt;Audit=no&lt;/code&gt; in &lt;code&gt;/etc/systemd/journald.conf&lt;/code&gt;, but that
didn't work. As &lt;code&gt;man 5 journald.conf&lt;/code&gt; says: &lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;Note&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;that&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;option&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;does&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;control&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;whether&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;systemd&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;journald&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;collects&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;generated&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;audit&lt;/span&gt;
&lt;span class="n"&gt;records&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;just&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;controls&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;whether&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;tells&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;kernel&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;generate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;them&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;This&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;means&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;
&lt;span class="n"&gt;another&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;tool&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;turns&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;auditing&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;even&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;systemd&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;journald&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;left&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;off&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;will&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;still&lt;/span&gt;
&lt;span class="n"&gt;collect&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;generated&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;The audit socket&lt;/h2&gt;
&lt;p&gt;The audit messages originate from the Linux kernel audit framework. In order to quiet
them down, you can pass &lt;code&gt;audit=0&lt;/code&gt; to the kernel at boot time. This prevents the kernel
from logging and the &lt;code&gt;systemd-journald-audit.socket&lt;/code&gt; unit from starting up. That means
no more audit log messages in my journal.&lt;/p&gt;
&lt;h2&gt;Configuring grub&lt;/h2&gt;
&lt;p&gt;Just open &lt;code&gt;/etc/default/grub&lt;/code&gt; and append &lt;code&gt;audit=0&lt;/code&gt; to the line that starts with
&lt;code&gt;GRUB_CMDLINE_LINUX&lt;/code&gt;. Regenerate your &lt;code&gt;grub.cfg&lt;/code&gt; with the following command:&lt;/p&gt;
&lt;p&gt;&lt;span style="color:red"&gt;&lt;strong&gt;WARNING&lt;/strong&gt;:&lt;/span&gt; You really need to verify whether (a) your
&lt;code&gt;grub.cfg&lt;/code&gt; is in the same location as mine&lt;sup id="fnref:2"&gt;&lt;a class="footnote-ref" href="#fn:2"&gt;2&lt;/a&gt;&lt;/sup&gt;, and (b) whether this command doesn't do
anything funky on your system. A broken &lt;code&gt;grub.cfg&lt;/code&gt;  will render your system unbootable!!
Make sure you at least have a backup of the original &lt;code&gt;grub.cfg&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now reboot your system. That should do it.&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;I do understand there is a purpose to these messages, and that not everyone should disable them. I also understand that I might have been artificially increasing the number of log messages by using monit to check on running services.&amp;#160;&lt;a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;It should be if you are on a UEFI system, but check anyway.&amp;#160;&lt;a class="footnote-backref" href="#fnref:2" title="Jump back to footnote 2 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="misc"/><category term="audit"/><category term="journald"/><category term="fedora"/></entry><entry><title>Batch downloading GitHub binaries</title><link href="https://100things.wzzrd.com/2020/12/31/Batch-downloading-GitHub-binaries.html" rel="alternate"/><published>2020-12-31T12:01:58+01:00</published><updated>2020-12-31T12:01:58+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2020-12-31:/2020/12/31/Batch-downloading-GitHub-binaries.html</id><summary type="html">&lt;h1&gt;Packages or binaries?&lt;/h1&gt;
&lt;p&gt;As much as possible, on my Fedora systems (which runs on my desktop, laptop and
a handful of Raspberry Pis), I use what &lt;code&gt;dnf&lt;/code&gt; provides me with. The same goes for
machines I run other operating systems on, like my pihole server (which runs Raspberry
Pi OS …&lt;/p&gt;</summary><content type="html">&lt;h1&gt;Packages or binaries?&lt;/h1&gt;
&lt;p&gt;As much as possible, on my Fedora systems (which runs on my desktop, laptop and
a handful of Raspberry Pis), I use what &lt;code&gt;dnf&lt;/code&gt; provides me with. The same goes for
machines I run other operating systems on, like my pihole server (which runs Raspberry
Pi OS).&lt;/p&gt;
&lt;p&gt;Sometimes though, that is not enough, when software is not packaged or recent versions
are not available over all the platforms I use.&lt;/p&gt;
&lt;p&gt;Obviously, I could package all software that's not currently in Fedora myself, but alas,
I simply do not have time to always do so.&lt;/p&gt;
&lt;h1&gt;Downloading binaries&lt;/h1&gt;
&lt;p&gt;Some binaries therefore, I simply choose to download directly from GitHub. Easy enough,
until you amass a couple of dozen of those. Then it becomes a burden to keep them up to
date.&lt;/p&gt;
&lt;p&gt;A long time ago, I wrote a script to grab the latest binary of a project for my OS and
architecture and drop it into ~/.local/bin.&lt;/p&gt;
&lt;p&gt;Over time, this script has become more complex (as scripts do), so recently I dropped it
into git and made it configurable and capable of batch downloading a whole bunch of
binaries at once. It's called 'ghdl', for GitHub Downloader. Very poetic.&lt;/p&gt;
&lt;h2&gt;Intermezzo: the sad state of releases on GitHub&lt;/h2&gt;
&lt;p&gt;Binary releases on GitHub are a complete and utter mess. Virtually every project out
there uses different schemes for naming their binaries. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Some projects put the architecture of the binary in the name, some don't. Some projects
call it amd64, some call it x86_64. Some projects call the ARMv7 architecture - quite
generically - arm, some call it armv7l. The trailing 'l' is dropped off some times.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Some projects call the aarch64 architecture arm64, which I have more than once
downloaded by accident instead of amd64.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Some projects release binaries with 'darwin', 'windows', and 'linux' in the name. Some
do the first two, but leave the OS out of the name for the binary meant for Linux.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Some projects provide plain binaries, some provide zip files, some provide tar balls.
Some provide all three. Some have yet other ways of packaging their binaries. There is
one project, for example, that only offers a single zip file with binaries for all
architectures in it. Yay?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Some projects do not offer actual binary downloads of their software in releases at all,
but just provide source code in zipfiles and tarballs (which is quite useless for me).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Some projects do not actually release anything (like the 'kn' binary for knative),
because all of their releases are labeled as 'pre-release', which makes the releases
page in the API show up empty.&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It would be great if GitHub could provide some guidance on file naming. Right now, all
GitHub does it nudge people towards semantic versioning - which is nice, don't get me
wrong - and tell people to prepend a 'v' in front of their version number.&lt;/p&gt;
&lt;p&gt;It would be awesome if GitHub would help people all follow the same template to name
binaries. Something like mybinary-linux-amd64 and mybinary-darwin-aarch64. &lt;/p&gt;
&lt;p&gt;It should actually be relatively simple for GitHub to detect the executable format and
deduct the platform for the binary. GitHub could have people upload a binary, ask for
a name ('mybinary', in my example above) and do the rest in the background: rename the
file to mybinary-linux-amd64, and provide optional tarballs and zipfiles. All the same
for every project. One can dream, right?&lt;/p&gt;
&lt;p&gt;But anyway, GitHub is not doing that, (and maybe there are downsides to it that I didn't
think of) so I tried hacking around the plethora of different naming schemes and came up
with a script that does the trick for me. It batch downloads some 40 binaries from
GitHub for me without error. You can easily specify your own list. The
&lt;a href="https://github.com/wzzrd/ghdl/blob/v0.5/README.md"&gt;Readme&lt;/a&gt; explains how to do that.&lt;/p&gt;
&lt;h2&gt;Intermezzo: So what about the gh binary?&lt;/h2&gt;
&lt;p&gt;What about it? I don't want to rely on yet another a binary to just talk to the GitHub
API. Apart from that, it actually does very few useful things for me. It doesn't select
the right binary for me, and it doesn't unpack it. I could use it to query the API, but
that's the easy bit of the script to be honest. The tricky bit is selecting and
downloading the right binary, and it doesn't help there ;)&lt;/p&gt;
&lt;h1&gt;Trying out the script&lt;/h1&gt;
&lt;p&gt;If you want to give it a go though, you can go to
&lt;a href="https://github.com/wzzrd/ghdl/tree/v0.5"&gt;GitHub&lt;/a&gt; and grab it. I just pushed version
v0.5, which has the ability to parse a YAML file of projects and organizations and
download the latest binary from all of them.&lt;/p&gt;
&lt;p&gt;The script will auto-detect your OS and architecture, but truth be told, I have only
tested it on Fedora (mostly), and Debian (a bit) for operating systems and mainly
x86_64 for architectures.&lt;/p&gt;
&lt;p&gt;To show a bit of an example, downloading the Digital Ocean commandline (doctl) would
work like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;./&lt;/span&gt;&lt;span class="n"&gt;ghdl&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;py&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;org&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;digitalocean&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;
&lt;span class="n"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;api&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;github&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;repos&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digitalocean&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;releases&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;latest&lt;/span&gt;
&lt;span class="n"&gt;Latest&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;found&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;v1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;54.0&lt;/span&gt;
&lt;span class="n"&gt;Release&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;URLs&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;found&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;github&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digitalocean&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;releases&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;download&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;v1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;54.0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;1.54&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;checksums&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sha256&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;github&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digitalocean&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;releases&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;download&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;v1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;54.0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;1.54&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;darwin&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;amd64&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tar&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gz&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;github&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digitalocean&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;releases&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;download&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;v1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;54.0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;1.54&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;linux&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;386.&lt;/span&gt;&lt;span class="n"&gt;tar&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gz&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;github&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digitalocean&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;releases&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;download&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;v1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;54.0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;1.54&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;linux&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;amd64&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tar&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gz&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;github&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digitalocean&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;releases&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;download&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;v1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;54.0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;1.54&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;windows&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;386.&lt;/span&gt;&lt;span class="n"&gt;zip&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;github&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digitalocean&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;releases&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;download&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;v1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;54.0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;1.54&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;windows&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;amd64&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;zip&lt;/span&gt;
&lt;span class="n"&gt;Filtered&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linux&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;x86_64&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;github&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digitalocean&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;releases&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;download&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;v1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;54.0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;1.54&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;linux&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;amd64&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tar&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gz&lt;/span&gt;
&lt;span class="n"&gt;Filtered&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;tarballs&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;zipfiles&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;github&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digitalocean&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;releases&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;download&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;v1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;54.0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;1.54&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;linux&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;amd64&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tar&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gz&lt;/span&gt;
&lt;span class="n"&gt;Downloading&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;installing&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="n"&gt;Downloaded&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;tmp&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;tmpa0j5yav8&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;1.54&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;linux&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;amd64&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tar&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gz&lt;/span&gt;
&lt;span class="n"&gt;Largest&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;tmp&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;tmpa0j5yav8&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;
&lt;span class="n"&gt;Cleaning&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;up&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;temporary&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;directory&lt;/span&gt;
&lt;span class="n"&gt;Symlink&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;exists&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Removing&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;recreating&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;Symlinked&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;home&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;myuser&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;Sync_Workstations&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;v1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;54.0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;home&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;myuser&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;Sync_Workstations&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;links&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doctl&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The script is a bit verbose at the moment. It's on my todo list ;)&lt;/p&gt;
&lt;p&gt;I hope this helps some people that are tired of keeping their minikube, starship and
doctl binaries up to date!&lt;/p&gt;
&lt;h2&gt;Caution!&lt;/h2&gt;
&lt;p&gt;A small word of caution here. The script will probably break for you. It works for me,
on my systems, but there is no guarantee whatsoever that it will work for anyone else!&lt;/p&gt;
&lt;p&gt;Also, right now, this script is a prototype and a huge mess, but I decided to release it
into the wild because it might help others.&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;This is why downloading the 'kn' binary with my script does not work, currently.&amp;#160;&lt;a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="dev"/><category term="python"/><category term="github"/><category term="fedora"/></entry><entry><title>Joplin and webdav</title><link href="https://100things.wzzrd.com/2020/10/25/Joplin-and-webdav.html" rel="alternate"/><published>2020-10-25T20:27:06+01:00</published><updated>2020-10-25T20:27:06+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2020-10-25:/2020/10/25/Joplin-and-webdav.html</id><summary type="html">&lt;h1&gt;Joplin and webdav&lt;/h1&gt;
&lt;h2&gt;What's Joplin?&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://joplinapp.org/"&gt;Joplin&lt;/a&gt; is a cross-platform note taking app that I use a lot to
keep track of my projects, and to organize my notes and thoughts. Joplin allows you to
create note books, and add an infinite number of notes to them. You can link between …&lt;/p&gt;</summary><content type="html">&lt;h1&gt;Joplin and webdav&lt;/h1&gt;
&lt;h2&gt;What's Joplin?&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://joplinapp.org/"&gt;Joplin&lt;/a&gt; is a cross-platform note taking app that I use a lot to
keep track of my projects, and to organize my notes and thoughts. Joplin allows you to
create note books, and add an infinite number of notes to them. You can link between
notes, link to external sources, add images, tables, etc. Everythin in markdown, very
easy to learn and use. It's basically an Evernote clone, without the subscription, and
without one other thing that I'll talk about later.&lt;/p&gt;
&lt;p&gt;Now I hear you say: "but Max, there are a 100 apps that do this, what makes this one
special?" I'll tell you what makes this app special. Three things, really:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Joplin is cross platform, and is available on Linux, Android, Windows, basically
   everywhere. This means I can have my notes on my tablet, which I find very
   convenient. How do I get my notes on my tablet though?&lt;/li&gt;
&lt;li&gt;That's where the second killer feature comes in: synchronization. Quite robust,
   cross-platform synchronization. All of my notes, available everywhere, always. Love
   it. This is what I'll be talking about next.&lt;/li&gt;
&lt;li&gt;This is maybe not so interesting for everyone, but I like it a lot: the ability to
   sponsor development through Patreon. I love the idea that I can sponsor small time
   developers of software that I love. I don't think this model scales to things like
   Linux distributions or things like that, but for things like Joplin, it's brilliant.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;There actually is a fourth reason: end-to-end encryption. Evernote does not have this,
and Joplin does, and this is something I &lt;em&gt;really, really&lt;/em&gt; want to have.&lt;/p&gt;
&lt;h3&gt;What's not to like?&lt;/h3&gt;
&lt;p&gt;So there's one thing I miss in Joplin, that Evernote does have, and that's the ability
to take handwritten notes. I have Samsung gear (and I used to have Apple gear) that
I would really welcome the ability to do handwritten notes for. On the other hand
though, doing handwritten notes on Evernote on Android &lt;strong&gt;sucks&lt;/strong&gt;, so there's that.&lt;/p&gt;
&lt;h2&gt;Syncing&lt;/h2&gt;
&lt;p&gt;Anyway, back to the topic at hand: syncing. Joplin supports various methods to sync:
OneDrive, file system, Nextcloud, Dropbox, Webdav and S3 (which is in beta right now).&lt;/p&gt;
&lt;h3&gt;Filesystem sync and syncthing&lt;/h3&gt;
&lt;p&gt;Back when I first started using Joplin, I used to sync to the file system, and then have
syncthing pick up the files and distribute them between my devices. I have a NAS that's
always on, so that worked kind of OK.&lt;/p&gt;
&lt;p&gt;However, when for some reason I would sync multiple devices at once (which I don't
usually do, but occasionally happened), weird things could happen, like conflicting
changes and clashing syncs. &lt;/p&gt;
&lt;h3&gt;Nextcloud&lt;/h3&gt;
&lt;p&gt;At some point, I had to build a server to temporary use, and decided to drop Nextcloud
on it for syncing. I - falsely - assumed Nextcloud would be the easiest sync method to
setup. Setting up Nextcloud is kind of a hassle, though, and sync performance has been
a hit or miss for me. I have been hit by
a &lt;a href="https://github.com/laurent22/joplin/issues/1023"&gt;bug&lt;/a&gt; that brought syncing to a crawl
before, and when that bug seemed to return when I had to rebuild my server to run Fedora
32 instead of CentOS, I gave up on Nextcloud.&lt;/p&gt;
&lt;p&gt;Apart from the slow syncing, the complexity of Nextcloud, in combination with the fact
that I used exactly &lt;em&gt;one&lt;/em&gt; feature of it (webdav), made me realize Joplin actually
supports plain webdav. I don't know why, but originally I assumed setting up webdav
would be complex, but it turns out it's in fact &lt;em&gt;super easy&lt;/em&gt;.&lt;/p&gt;
&lt;h3&gt;Webdav&lt;/h3&gt;
&lt;p&gt;So assuming you already have apache running on your Fedora box, you create a virtualhost
to point to your webdav directory, and prevent unauthorized access to it. Basic auth is
enough here, since I'm the only one using it, and we're using SSL to prevent snooping.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;VirtualHost&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;*:443&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;ServerName&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;your.dav.server.com
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;DocumentRoot&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/var/webdav/files&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;ErrorLog&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;logs/ssl_error_log_dav
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;TransferLog&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;logs/ssl_access_log_dav
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;CustomLog&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;logs/ssl_request_log_dav&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \&amp;quot;%r\&amp;quot; %b&amp;quot;&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;SSLEngine&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;on&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;SSLCipherSuite&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;AES256+EECDH:AES256+EDH
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;SSLProtocol&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;All&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-SSLv2&lt;span class="w"&gt; &lt;/span&gt;-SSLv3
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;SSLHonorCipherOrder&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;On&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;SSLCompression&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;off&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;SSLCertificateFile&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sx"&gt;/etc/letsencrypt/live/your.dav.server/cert.pem&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;SSLCertificateKeyFile&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sx"&gt;/etc/letsencrypt/live/your.dav.server/privkey.pem&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;SSLCertificateChainFile&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sx"&gt;/etc/letsencrypt/live/your.dav.server/chain.pem&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;Location&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;Require&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;valid-user
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;AuthType&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Basic&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;AuthName&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Oh no you didn&amp;#39;t&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;AuthBasicProvider&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;file
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;AuthUserFile&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sx"&gt;/var/webdav/.htpasswd&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;Dav&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;On&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/Location&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/VirtualHost&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I'm assuming how to set up Let's Encrypt certificates and creating a virtual host on
Apache is known. If not, I might do a follow-up post about that. Let me know ;)&lt;/p&gt;
&lt;p&gt;Of course, we need to create and properly label our webdav directory before we can
actually start running our server:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;mkdir&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;webdav&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;
&lt;span class="n"&gt;semanage&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;fcontext&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;httpd_sys_rw_content_t&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;/var/webdav/files(/.*)?&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;systemctl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;enable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;httpd&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And finally, we'll create the htpasswd file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;htpasswd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;c5&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;webdav&lt;/span&gt;&lt;span class="o"&gt;/.&lt;/span&gt;&lt;span class="n"&gt;htpasswd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;myuser&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now you can use the myuser and the password you just set up in your Joplin config, both
on your Fedora desktop, as well as for any other platforms, like Android, and sync them
all nicely and securely.&lt;/p&gt;
&lt;p&gt;I still have end-to-end encryption enabled as well though :)&lt;/p&gt;</content><category term="misc"/><category term="blog"/><category term="joplin"/><category term="webdav"/><category term="sync"/><category term="notes"/><category term="fedora"/></entry><entry><title>Using Minikube On Fedora With The Registry Addon</title><link href="https://100things.wzzrd.com/2020/02/05/Using-Minikube-on-Fedora-with-the-Registry-Addon.html" rel="alternate"/><published>2020-02-05T10:49:06+01:00</published><updated>2020-02-05T10:49:06+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2020-02-05:/2020/02/05/Using-Minikube-on-Fedora-with-the-Registry-Addon.html</id><summary type="html">&lt;h1&gt;Table of Contents&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#orgc4f8f5a"&gt;Setting up minikube on Fedora 31&lt;/a&gt;&lt;ol&gt;
&lt;li&gt;&lt;a href="#orgd736038"&gt;Setting up a minikube VM&lt;/a&gt;&lt;ol&gt;
&lt;li&gt;&lt;a href="#orge4e6922"&gt;Downloading the required binaries&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#orgf0f217c"&gt;Configuring minikube&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#org4362c8d"&gt;Starting the minikube VM&lt;/a&gt;&lt;ol&gt;
&lt;li&gt;&lt;a href="#org160b1f1"&gt;Enabling the registry addon&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#org3b3c22b"&gt;Pushing images into the registry and running them!&lt;/a&gt;&lt;ol&gt;
&lt;li&gt;&lt;a href="#orgd9cd67f"&gt;Starting the container&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a id="orgc4f8f5a"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;Update (March 6, 2020)&lt;/h1&gt;
&lt;p&gt;I have updated the below description for …&lt;/p&gt;</summary><content type="html">&lt;h1&gt;Table of Contents&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#orgc4f8f5a"&gt;Setting up minikube on Fedora 31&lt;/a&gt;&lt;ol&gt;
&lt;li&gt;&lt;a href="#orgd736038"&gt;Setting up a minikube VM&lt;/a&gt;&lt;ol&gt;
&lt;li&gt;&lt;a href="#orge4e6922"&gt;Downloading the required binaries&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#orgf0f217c"&gt;Configuring minikube&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#org4362c8d"&gt;Starting the minikube VM&lt;/a&gt;&lt;ol&gt;
&lt;li&gt;&lt;a href="#org160b1f1"&gt;Enabling the registry addon&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#org3b3c22b"&gt;Pushing images into the registry and running them!&lt;/a&gt;&lt;ol&gt;
&lt;li&gt;&lt;a href="#orgd9cd67f"&gt;Starting the container&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a id="orgc4f8f5a"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;Update (March 6, 2020)&lt;/h1&gt;
&lt;p&gt;I have updated the below description for minikube 1.7.3, which is a little different
than the 1.6.2 version that I originally wrote this tutorial for.&lt;/p&gt;
&lt;p&gt;The main difference is in what minikube config is done (I'm adding a vm-driver config
option, and an insecure-registry option), though I'm not 100% if this is working,
because I'm also still explicitly using the &lt;code&gt;--insecure-registry&lt;/code&gt; flag and enabling the
registry addon. Without these, pushing an image into the registry (or pulling from it)
for a deployment, does not work.&lt;/p&gt;
&lt;p&gt;Enabling the registry addon needs to happen &lt;em&gt;after&lt;/em&gt; starting the minikube VM now though,
and not before.&lt;/p&gt;
&lt;h1&gt;Setting up minikube on Fedora 31&lt;/h1&gt;
&lt;p&gt;The article on setting up OpenShift 4.3 on libvirt VMs is not quite done yet.
In the meantime though, I've been playing around with minikube as well. Just
to get a feel of plain Kubernetes without the productive / useful abstractions
OpenShift uses (OpenShift being certified Kubernetes,
&lt;a href="https://www.openshift.com/products/container-platform"&gt;btw&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&lt;a id="orgd736038"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Setting up a minikube VM&lt;/h2&gt;
&lt;p&gt;&lt;a id="orge4e6922"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Downloading the required binaries&lt;/h3&gt;
&lt;p&gt;Setting up minikube on Fedora is really, really easy. It's not packaged as an RPM, but
you only have to go &lt;a href="https://github.com/kubernetes/minikube/releases"&gt;here&lt;/a&gt; and download
the latest release. I prefer to stick with stable, which is v1.7.3 at the moment of
writing this.&lt;/p&gt;
&lt;p&gt;Together with the main minikube binary, you need to download the
&lt;code&gt;docker-machine-driver-kvm2&lt;/code&gt; binary. Drop both that file and the minikube
binary itself into your &lt;code&gt;PATH&lt;/code&gt; and you are ready to go.&lt;/p&gt;
&lt;p&gt;(There is an RPM available as well, but I use the binary downloads.)&lt;/p&gt;
&lt;p&gt;&lt;a id="orgf0f217c"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Configuring minikube&lt;/h3&gt;
&lt;p&gt;Minikube should work fine without any additional configuration at this
point, but I usually make some changes.&lt;/p&gt;
&lt;p&gt;The first thing I like to do, is increase the default memory. According to the doc, by
&lt;a href="https://minikube.sigs.k8s.io/docs/start/linux/"&gt;default&lt;/a&gt;, minikube only allocates 2GiB
of RAM, which is next to nothing. I increase it to at least 10GiB instead.&lt;/p&gt;
&lt;p&gt;I also like to switch the amount of vCPUs to at least 4, but sometimes more,
depending on what I'm playing around with (I have a ton of CPUs in my
machine anyway). The default is 2 vCPUs; if that's enough for you, leave it
as is.&lt;/p&gt;
&lt;p&gt;Let's also increase the size of the disk to 30GiB so we can store some
images. 20GiB is the default here, and it will be created as a thin
provisioned, raw disk image in &lt;code&gt;~/.minikube/machines&lt;/code&gt; by default.&lt;/p&gt;
&lt;p&gt;Finally, in order to make sure we use the container runtime that aligns best
to Kubernetes itself, we set the container-runtime configuration property to &lt;code&gt;crio&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;minikube&lt;span class="w"&gt; &lt;/span&gt;config&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;memory&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;10240&lt;/span&gt;
$&lt;span class="w"&gt; &lt;/span&gt;minikube&lt;span class="w"&gt; &lt;/span&gt;config&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;cpus&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;
$&lt;span class="w"&gt; &lt;/span&gt;minikube&lt;span class="w"&gt; &lt;/span&gt;config&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;disk-size&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;30000&lt;/span&gt;
$&lt;span class="w"&gt; &lt;/span&gt;minikube&lt;span class="w"&gt; &lt;/span&gt;config&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;container-runtime&lt;span class="w"&gt; &lt;/span&gt;crio
$&lt;span class="w"&gt; &lt;/span&gt;minikube&lt;span class="w"&gt; &lt;/span&gt;config&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;vm-driver&lt;span class="w"&gt; &lt;/span&gt;kvm2
$&lt;span class="w"&gt; &lt;/span&gt;minikube&lt;span class="w"&gt; &lt;/span&gt;config&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;insecure-registry&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;192&lt;/span&gt;.168.39.0/24
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;a id="org4362c8d"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Starting the minikube VM&lt;/h2&gt;
&lt;p&gt;This should be a fairly short paragraph, but there's one thing to talk about
here. Minikube allows you to run different instances of minikube in different
profiles. Profiles are basically named instances of minikube.&lt;/p&gt;
&lt;p&gt;For example, you can have a minikube instance to play around with to learn
Kubernetes itself, and you can have one to - I don't know - test your app in.
The first could be called &lt;code&gt;k8s-test&lt;/code&gt;, the second one &lt;code&gt;myapp&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In order to start a named minikube instance, we run it with the &lt;code&gt;-p&lt;/code&gt; option:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;minikube&lt;span class="w"&gt; &lt;/span&gt;start&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;mytest
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Start a minikube instance for real, and let's push some images into the
registry living on it! Make sure to use the &lt;code&gt;--insecure-registry&lt;/code&gt; option
like below. You'll need that to have minikube pull from it!&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;minikube&lt;span class="w"&gt; &lt;/span&gt;start&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;mytest&lt;span class="w"&gt; &lt;/span&gt;--insecure-registry&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;192.168.39.0/24&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you &lt;code&gt;minikube stop -p mytest&lt;/code&gt;, in order to start your minikube VM again, you &lt;em&gt;will&lt;/em&gt;
need to use the &lt;code&gt;--insecure-registry&lt;/code&gt; flag again!&lt;/p&gt;
&lt;p&gt;&lt;a id="org160b1f1"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Enabling the registry addon&lt;/h3&gt;
&lt;p&gt;I want to be able to push images into minikube, so I need to run a registry
in it. We can get a list of available addons to minikube by running:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;minikube&lt;span class="w"&gt; &lt;/span&gt;addons&lt;span class="w"&gt; &lt;/span&gt;list
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This will show you all the available options. To enable the registry addon,
we only need to run &lt;em&gt;while our mytest minikube VM is running&lt;/em&gt; (which is different from
previous versions of minikube!):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;minikube&lt;span class="w"&gt; &lt;/span&gt;addons&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;enable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;registry&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;mytest
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;That's all, we good to go!&lt;/p&gt;
&lt;p&gt;&lt;a id="org3b3c22b"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;Pushing images into the registry and running them!&lt;/h1&gt;
&lt;p&gt;I want to be able to build images of my app locally, then push them into the
minikube registry and run them from there. The registry on minikube does not
have TLS enabled. To get images in there, for me the easiest way to do that
was to wield &lt;code&gt;skopeo&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;First, let's see what images we have, locally:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;podman&lt;span class="w"&gt; &lt;/span&gt;images
REPOSITORY&lt;span class="w"&gt;                                                         &lt;/span&gt;TAG&lt;span class="w"&gt;      &lt;/span&gt;IMAGE&lt;span class="w"&gt; &lt;/span&gt;ID&lt;span class="w"&gt;       &lt;/span&gt;CREATED&lt;span class="w"&gt;        &lt;/span&gt;SIZE
registry.redhat.io/rhel8/nodejs-10&lt;span class="w"&gt;                                 &lt;/span&gt;latest&lt;span class="w"&gt;   &lt;/span&gt;72b60f3a377b&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;weeks&lt;span class="w"&gt; &lt;/span&gt;ago&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="m"&gt;788&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MB
registry.redhat.io/openjdk/openjdk-11-rhel7&lt;span class="w"&gt;                        &lt;/span&gt;latest&lt;span class="w"&gt;   &lt;/span&gt;9a6cd285b6c8&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;weeks&lt;span class="w"&gt; &lt;/span&gt;ago&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="m"&gt;510&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MB
registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift&lt;span class="w"&gt;   &lt;/span&gt;latest&lt;span class="w"&gt;   &lt;/span&gt;963af2cdd61f&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;weeks&lt;span class="w"&gt; &lt;/span&gt;ago&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="m"&gt;491&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MB
registry.redhat.io/rhel8/postgresql-10&lt;span class="w"&gt;                             &lt;/span&gt;latest&lt;span class="w"&gt;   &lt;/span&gt;58950bf238bf&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="m"&gt;8&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;weeks&lt;span class="w"&gt; &lt;/span&gt;ago&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="m"&gt;407&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MB
registry.access.redhat.com/ubi8/ubi&lt;span class="w"&gt;                                &lt;/span&gt;latest&lt;span class="w"&gt;   &lt;/span&gt;096cae65a207&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="m"&gt;8&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;weeks&lt;span class="w"&gt; &lt;/span&gt;ago&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="m"&gt;239&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MB
registry.redhat.io/ubi8/ubi&lt;span class="w"&gt;                                        &lt;/span&gt;latest&lt;span class="w"&gt;   &lt;/span&gt;096cae65a207&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="m"&gt;8&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;weeks&lt;span class="w"&gt; &lt;/span&gt;ago&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="m"&gt;239&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MB
registry.access.redhat.com/ubi8/ubi&lt;span class="w"&gt;                                &lt;/span&gt;&lt;span class="m"&gt;8&lt;/span&gt;.1&lt;span class="w"&gt;      &lt;/span&gt;096cae65a207&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="m"&gt;8&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;weeks&lt;span class="w"&gt; &lt;/span&gt;ago&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="m"&gt;239&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MB
registry.access.redhat.com/ubi8/ubi-minimal&lt;span class="w"&gt;                        &lt;/span&gt;latest&lt;span class="w"&gt;   &lt;/span&gt;469119976c56&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;months&lt;span class="w"&gt; &lt;/span&gt;ago&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="m"&gt;107&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MB
registry.fedoraproject.org/fedora-minimal&lt;span class="w"&gt;                          &lt;/span&gt;latest&lt;span class="w"&gt;   &lt;/span&gt;7bb5a60e8a78&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;months&lt;span class="w"&gt; &lt;/span&gt;ago&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="m"&gt;167&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MB
registry.fedoraproject.org/f29/httpd&lt;span class="w"&gt;                               &lt;/span&gt;latest&lt;span class="w"&gt;   &lt;/span&gt;25c76f9dcdb5&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="m"&gt;9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;months&lt;span class="w"&gt; &lt;/span&gt;ago&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="m"&gt;482&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MB
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;As an example, let's push the &lt;code&gt;fedora-minimal&lt;/code&gt; image into our registry:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;skopeo&lt;span class="w"&gt; &lt;/span&gt;copy&lt;span class="w"&gt; &lt;/span&gt;--dest-tls-verify&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;docker://registry.fedoraproject.org/f29/httpd&lt;span class="w"&gt; &lt;/span&gt;docker://&lt;span class="k"&gt;$(&lt;/span&gt;minikube&lt;span class="w"&gt; &lt;/span&gt;ip&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;mytest&lt;span class="k"&gt;)&lt;/span&gt;:5000/f29/httpd
Getting&lt;span class="w"&gt; &lt;/span&gt;image&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;signatures
Copying&lt;span class="w"&gt; &lt;/span&gt;blob&lt;span class="w"&gt; &lt;/span&gt;7692efc5f81c&lt;span class="w"&gt; &lt;/span&gt;skipped:&lt;span class="w"&gt; &lt;/span&gt;already&lt;span class="w"&gt; &lt;/span&gt;exists
Copying&lt;span class="w"&gt; &lt;/span&gt;blob&lt;span class="w"&gt; &lt;/span&gt;d77ff9f653ce&lt;span class="w"&gt; &lt;/span&gt;skipped:&lt;span class="w"&gt; &lt;/span&gt;already&lt;span class="w"&gt; &lt;/span&gt;exists
Copying&lt;span class="w"&gt; &lt;/span&gt;blob&lt;span class="w"&gt; &lt;/span&gt;aaf5ad2e1aa3&lt;span class="w"&gt; &lt;/span&gt;skipped:&lt;span class="w"&gt; &lt;/span&gt;already&lt;span class="w"&gt; &lt;/span&gt;exists
Copying&lt;span class="w"&gt; &lt;/span&gt;config&lt;span class="w"&gt; &lt;/span&gt;25c76f9dcd&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;done&lt;/span&gt;
Writing&lt;span class="w"&gt; &lt;/span&gt;manifest&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;image&lt;span class="w"&gt; &lt;/span&gt;destination
Storing&lt;span class="w"&gt; &lt;/span&gt;signatures
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And that's it. We can now start that container. &lt;/p&gt;
&lt;p&gt;&lt;a id="orgd9cd67f"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Starting the container&lt;/h2&gt;
&lt;p&gt;We point the deployment to the local registry and everything from that point
on is automatic:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;kubectl&lt;span class="w"&gt; &lt;/span&gt;run&lt;span class="w"&gt; &lt;/span&gt;apache&lt;span class="w"&gt; &lt;/span&gt;--image&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;minikube&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;mytest&lt;span class="w"&gt; &lt;/span&gt;ip&lt;span class="k"&gt;)&lt;/span&gt;:5000/f29/httpd
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Let's check what's going on:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;kubectl&lt;span class="w"&gt; &lt;/span&gt;get&lt;span class="w"&gt; &lt;/span&gt;pods
NAME&lt;span class="w"&gt;                       &lt;/span&gt;READY&lt;span class="w"&gt;   &lt;/span&gt;STATUS&lt;span class="w"&gt;    &lt;/span&gt;RESTARTS&lt;span class="w"&gt;   &lt;/span&gt;AGE
apache-f698479d9-ltqvf&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;/1&lt;span class="w"&gt;     &lt;/span&gt;Running&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="w"&gt;          &lt;/span&gt;11m
$&lt;span class="w"&gt; &lt;/span&gt;kubectl&lt;span class="w"&gt; &lt;/span&gt;logs&lt;span class="w"&gt; &lt;/span&gt;apache-f698479d9-ltqv
&lt;span class="o"&gt;=&lt;/span&gt;&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;sourcing&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;-set-mpm.sh&lt;span class="w"&gt; &lt;/span&gt;...
&lt;span class="o"&gt;=&lt;/span&gt;&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;sourcing&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;20&lt;/span&gt;-copy-config.sh&lt;span class="w"&gt; &lt;/span&gt;...
&lt;span class="o"&gt;=&lt;/span&gt;&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;sourcing&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;40&lt;/span&gt;-ssl-certs.sh&lt;span class="w"&gt; &lt;/span&gt;...
AH00558:&lt;span class="w"&gt; &lt;/span&gt;httpd:&lt;span class="w"&gt; &lt;/span&gt;Could&lt;span class="w"&gt; &lt;/span&gt;not&lt;span class="w"&gt; &lt;/span&gt;reliably&lt;span class="w"&gt; &lt;/span&gt;determine&lt;span class="w"&gt; &lt;/span&gt;the&lt;span class="w"&gt; &lt;/span&gt;server&lt;span class="s1"&gt;&amp;#39;s fully qualified domain name, using 10.1.0.18. Set the &amp;#39;&lt;/span&gt;ServerName&lt;span class="s1"&gt;&amp;#39; directive globally to suppress this message&lt;/span&gt;
&lt;span class="s1"&gt;[Wed Feb 05 09:30:46.294280 2020] [ssl:warn] [pid 1:tid 140049696796032] AH01882: Init: this version of mod_ssl was compiled against a newer library (OpenSSL 1.1.1b FIPS  26 Feb 2019, version currently loaded is OpenSSL 1.1.1 FIPS  11 Sep 2018) - may result in undefined or erroneous behavior&lt;/span&gt;
&lt;span class="s1"&gt;[Wed Feb 05 09:30:46.294874 2020] [ssl:warn] [pid 1:tid 140049696796032] AH01909: 10.1.0.18:8443:0 server certificate does NOT include an ID which matches the server name&lt;/span&gt;
&lt;span class="s1"&gt;AH00558: httpd: Could not reliably determine the server&amp;#39;&lt;/span&gt;s&lt;span class="w"&gt; &lt;/span&gt;fully&lt;span class="w"&gt; &lt;/span&gt;qualified&lt;span class="w"&gt; &lt;/span&gt;domain&lt;span class="w"&gt; &lt;/span&gt;name,&lt;span class="w"&gt; &lt;/span&gt;using&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;.1.0.18.&lt;span class="w"&gt; &lt;/span&gt;Set&lt;span class="w"&gt; &lt;/span&gt;the&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;ServerName&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;directive&lt;span class="w"&gt; &lt;/span&gt;globally&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;suppress&lt;span class="w"&gt; &lt;/span&gt;this&lt;span class="w"&gt; &lt;/span&gt;message
&lt;span class="o"&gt;[&lt;/span&gt;Wed&lt;span class="w"&gt; &lt;/span&gt;Feb&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;05&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;09&lt;/span&gt;:30:46.352319&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;2020&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;ssl:warn&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;pid&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;:tid&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;140049696796032&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;AH01882:&lt;span class="w"&gt; &lt;/span&gt;Init:&lt;span class="w"&gt; &lt;/span&gt;this&lt;span class="w"&gt; &lt;/span&gt;version&lt;span class="w"&gt; &lt;/span&gt;of&lt;span class="w"&gt; &lt;/span&gt;mod_ssl&lt;span class="w"&gt; &lt;/span&gt;was&lt;span class="w"&gt; &lt;/span&gt;compiled&lt;span class="w"&gt; &lt;/span&gt;against&lt;span class="w"&gt; &lt;/span&gt;a&lt;span class="w"&gt; &lt;/span&gt;newer&lt;span class="w"&gt; &lt;/span&gt;library&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;OpenSSL&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;.1.1b&lt;span class="w"&gt; &lt;/span&gt;FIPS&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;26&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Feb&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;2019&lt;/span&gt;,&lt;span class="w"&gt; &lt;/span&gt;version&lt;span class="w"&gt; &lt;/span&gt;currently&lt;span class="w"&gt; &lt;/span&gt;loaded&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;OpenSSL&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;.1.1&lt;span class="w"&gt; &lt;/span&gt;FIPS&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;11&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Sep&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;2018&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-&lt;span class="w"&gt; &lt;/span&gt;may&lt;span class="w"&gt; &lt;/span&gt;result&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;undefined&lt;span class="w"&gt; &lt;/span&gt;or&lt;span class="w"&gt; &lt;/span&gt;erroneous&lt;span class="w"&gt; &lt;/span&gt;behavior
&lt;span class="o"&gt;[&lt;/span&gt;Wed&lt;span class="w"&gt; &lt;/span&gt;Feb&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;05&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;09&lt;/span&gt;:30:46.352919&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;2020&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;ssl:warn&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;pid&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;:tid&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;140049696796032&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;AH01909:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;.1.0.18:8443:0&lt;span class="w"&gt; &lt;/span&gt;server&lt;span class="w"&gt; &lt;/span&gt;certificate&lt;span class="w"&gt; &lt;/span&gt;does&lt;span class="w"&gt; &lt;/span&gt;NOT&lt;span class="w"&gt; &lt;/span&gt;include&lt;span class="w"&gt; &lt;/span&gt;an&lt;span class="w"&gt; &lt;/span&gt;ID&lt;span class="w"&gt; &lt;/span&gt;which&lt;span class="w"&gt; &lt;/span&gt;matches&lt;span class="w"&gt; &lt;/span&gt;the&lt;span class="w"&gt; &lt;/span&gt;server&lt;span class="w"&gt; &lt;/span&gt;name
&lt;span class="o"&gt;[&lt;/span&gt;Wed&lt;span class="w"&gt; &lt;/span&gt;Feb&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;05&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;09&lt;/span&gt;:30:46.353031&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;2020&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;lbmethod_heartbeat:notice&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;pid&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;:tid&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;140049696796032&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;AH02282:&lt;span class="w"&gt; &lt;/span&gt;No&lt;span class="w"&gt; &lt;/span&gt;slotmem&lt;span class="w"&gt; &lt;/span&gt;from&lt;span class="w"&gt; &lt;/span&gt;mod_heartmonitor
&lt;span class="o"&gt;[&lt;/span&gt;Wed&lt;span class="w"&gt; &lt;/span&gt;Feb&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;05&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;09&lt;/span&gt;:30:46.354288&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;2020&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;mpm_event:notice&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;pid&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;:tid&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;140049696796032&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;AH00489:&lt;span class="w"&gt; &lt;/span&gt;Apache/2.4.39&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;Fedora&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;OpenSSL/1.1.1&lt;span class="w"&gt; &lt;/span&gt;configured&lt;span class="w"&gt; &lt;/span&gt;--&lt;span class="w"&gt; &lt;/span&gt;resuming&lt;span class="w"&gt; &lt;/span&gt;normal&lt;span class="w"&gt; &lt;/span&gt;operations
&lt;span class="o"&gt;[&lt;/span&gt;Wed&lt;span class="w"&gt; &lt;/span&gt;Feb&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;05&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;09&lt;/span&gt;:30:46.354302&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;2020&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;core:notice&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;pid&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;:tid&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;140049696796032&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;AH00094:&lt;span class="w"&gt; &lt;/span&gt;Command&lt;span class="w"&gt; &lt;/span&gt;line:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;httpd -D FOREGROUND&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Excellent! Happy containering from this point on!&lt;/p&gt;</content><category term="dev"/><category term="blog"/><category term="k8s"/><category term="fedora"/></entry><entry><title>Tempus Fugit, or moving from hubpress to Jekyll</title><link href="https://100things.wzzrd.com/2020/01/20/Tempus-Fugit.html" rel="alternate"/><published>2020-01-20T13:41:55+01:00</published><updated>2020-01-20T13:41:55+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2020-01-20:/2020/01/20/Tempus-Fugit.html</id><summary type="html">&lt;p&gt;The other day, I was looking at writing a new blog post about something I was trying out
with Quarkus&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt; and Kubernetes.&lt;/p&gt;
&lt;p&gt;When I opened my blog, I realised I hadn't updated the underlying hubpress code in quite
a while. A long while. So long, in fact, that I …&lt;/p&gt;</summary><content type="html">&lt;p&gt;The other day, I was looking at writing a new blog post about something I was trying out
with Quarkus&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt; and Kubernetes.&lt;/p&gt;
&lt;p&gt;When I opened my blog, I realised I hadn't updated the underlying hubpress code in quite
a while. A long while. So long, in fact, that I couldn't update hubpress anymore,
because, much to my distress, the hubpress project had been archived by its author in
the meantime. It had been archived months ago, and because I had not written a blog in
over a year, I hadn't even noticed.&lt;/p&gt;
&lt;p&gt;I think it's safe to say I do not have a lucky hand in picking new open source projects
to build my own stuff upon. But that's part of the risk of running new tech sometimes,
right?&lt;/p&gt;
&lt;h1&gt;A new year, a new blog&lt;/h1&gt;
&lt;p&gt;Anyway, after some brief looking around, I decided to move my blog into
&lt;a href="https://jekyllrb.com"&gt;Jekyll&lt;/a&gt;, which seems to have a decent community and is
conceptually quite close to hubpress: being just text files with some markup in Git.&lt;/p&gt;
&lt;p&gt;Another quite nice aspect of Jekyll as a migration target was that I could make it so
that all of the URLs to my posts would remain identical. Quite nice for search engines
and blog aggregation. It's also really easy to generate an RSS feed with Jekyll, and
embed things like Disqus comments and Google Analytics.&lt;/p&gt;
&lt;p&gt;Speaking of feeds, I really do hope that switching from the Hubpress feed to the Jekyll
feed will not make all of my old posts show up as new ones in aggregators. If they do,
sorry :/&lt;/p&gt;
&lt;p&gt;I did decide to move away from hosting my blog in Github, because the experience with
hubpress on Github wasn't always stellar.&lt;/p&gt;
&lt;h2&gt;Setting up a new Jekyll blog&lt;/h2&gt;
&lt;p&gt;The migration itself wasn't that hard. These are the steps I took to migrate from
hubpress to Jekyll. The obvious step 0 was to install Jekyll and create a new blog with
it. I installed via rubygems because I wanted to get started with Jekyll 4.0.0, not an
older version. My workstation runs on Fedora 31, my server on EL7, so installing through
a rubygem will make it easier to keep my various Jekyll installations in sync.&lt;/p&gt;
&lt;p&gt;So:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;gem&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;jekyll&lt;span class="w"&gt; &lt;/span&gt;bundler
$&lt;span class="w"&gt; &lt;/span&gt;jekyll&lt;span class="w"&gt; &lt;/span&gt;new&lt;span class="w"&gt; &lt;/span&gt;100things
$&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;100things
$&lt;span class="w"&gt; &lt;/span&gt;git&lt;span class="w"&gt; &lt;/span&gt;init&lt;span class="w"&gt; &lt;/span&gt;.
$&lt;span class="w"&gt; &lt;/span&gt;git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;.
$&lt;span class="w"&gt; &lt;/span&gt;git&lt;span class="w"&gt; &lt;/span&gt;commit&lt;span class="w"&gt; &lt;/span&gt;-m&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Initial commit of empty blog&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;# further git commits will not be&lt;/span&gt;
mentioned
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h1&gt;Converting my posts&lt;/h1&gt;
&lt;p&gt;Then, I took all the adoc files from the _posts directory in my hubpress repo and 
dropped them into the _posts directory in my Jekyll directory. Because these files are
in asciidoc and the default for Jekyll is markdown, I had to install the asciidoc plugin
for Jekyll. You can do this by adding &lt;code&gt;gem "jekyll-asciidoc", "~&amp;gt; 3.0.0"&lt;/code&gt; to your
Gemfile and running &lt;code&gt;bundle install&lt;/code&gt; from your Jekyll directory&lt;sup id="fnref:2"&gt;&lt;a class="footnote-ref" href="#fn:2"&gt;2&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;p&gt;I added so-called "front matter" to all files, adding the name of the layout, the title
of the post, the date and a converted set of tags to each file. I converted the hp-tags
of hubpress into Jekyll tags, though I'm not actually using them yet.&lt;/p&gt;
&lt;p&gt;This basically means you just go from having&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;:hp-tags: satellite6, youtube, virt-who, vdc, subscriptions, activation keys
{% endhighlight %}
to
{% highlight markdown %}
tags: [satellite6, youtube, virt-who, vdc, subscriptions, activation-keys]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Quite simple, and easy to automate with a little vim macro.&lt;/p&gt;
&lt;p&gt;Some files I had to rename to &lt;code&gt;.markdown&lt;/code&gt; from &lt;code&gt;.adoc&lt;/code&gt; and manually convert to markdown
because embedding Youtube videos didn't work. Moving files from asciidoc to markdown can
be automated through some asciidoc and pandoc commands, but I settled on doing it
manually. It was only a dozen or so posts that needed converting, and I had to fix
embedding videos manually anyway.&lt;/p&gt;
&lt;h2&gt;Embedding Youtube&lt;/h2&gt;
&lt;p&gt;I created two little include files in order to easily embed Youtube videos in a DRY
way, following the instructions on &lt;a href="https://silvercircle.github.io/2017/10/10/embed-youtube-jekyll/"&gt;this
page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In short, I created &lt;code&gt;_includes/youtube.html&lt;/code&gt;, containing:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="x"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
&lt;span class="x"&gt;{% include youtube.css %}&lt;/span&gt;
&lt;span class="x"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;span class="x"&gt;{% if include.width != &amp;#39;&amp;#39; %}&lt;/span&gt;
&lt;span class="x"&gt;  &amp;lt;div style=&amp;quot;width: {{include.width}}; margin:0 auto;&amp;quot;&amp;gt;&lt;/span&gt;
&lt;span class="x"&gt;{% else %}&lt;/span&gt;
&lt;span class="x"&gt;  &amp;lt;div&amp;gt;&lt;/span&gt;
&lt;span class="x"&gt;{% endif %}&lt;/span&gt;
&lt;span class="x"&gt;  &amp;lt;div class=&amp;quot;ytcontainer&amp;quot;&amp;gt;&lt;/span&gt;
&lt;span class="x"&gt;    &amp;lt;iframe class=&amp;quot;yt&amp;quot; allowfullscreen src=&amp;quot;https://www.youtube.com/embed/{{include.id}}&amp;quot;&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/span&gt;
&lt;span class="x"&gt;  &amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="x"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="x"&gt;{% endraw %}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;and &lt;code&gt;_includes/youtube.css&lt;/code&gt;, containing:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ytcontainer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;padding-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;56.25&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;iframe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;yt&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This allows me to do something like this to embed a video, which I think is pretty nice:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="x"&gt;{% include youtube.html id=&amp;quot;byIf3Vb8sS0&amp;quot; %}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Adding some extra functionality&lt;/h2&gt;
&lt;p&gt;I've installed some additional plugins to make my future life a little easier. Jekyll
has very nice plugins to create archive pages (still under construction though), and for
embedding asciinema recordings. I don't think I've used to those much yet, but I sure
will now :)&lt;/p&gt;
&lt;h2&gt;Themes&lt;/h2&gt;
&lt;p&gt;I'm using &lt;code&gt;plainwhite&lt;/code&gt; as my theme for the time being. It's exactly what is says. White
and plain. I'm looking for something nicer, but on whether I'll buy a theme, create my
own theme or find something that looks nice and is free, I'm still undecided.&lt;/p&gt;
&lt;h1&gt;Up next!&lt;/h1&gt;
&lt;p&gt;I'm in the process of learning more appdev related stuff. Partially for work (I'm
broadening my horizon, so to speak) and for fun. This means I'm diving into Java
programming (with Quarkus), some Rust programming, integration, Kubernetes and it's
various extensions, like &lt;a href="https://github.com/tektoncd"&gt;Tekton&lt;/a&gt; and
&lt;a href="https://knative.dev/"&gt;knative&lt;/a&gt;, and more. Much to learn, much to do.&lt;/p&gt;
&lt;p&gt;This means I need to (and actually will) start blogging again! This post is step one in
at least creating more blogs than in 2019 (achievement unlocked! 2020: 1, 2019: 0). Over
the next couple of days, I hope to publish my first blog on Quarkus. I'm not sure
what'll be next, but I &lt;em&gt;am&lt;/em&gt; sure you'll read about it here!&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;&lt;a href="https://quarkus.io"&gt;Quarkus&lt;/a&gt; is the most awesomemest Java framework. Even I can do things with it!&amp;#160;&lt;a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;I have configured rubygems to install all gems into my home directory, not system wide.&amp;#160;&lt;a class="footnote-backref" href="#fnref:2" title="Jump back to footnote 2 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="meta"/><category term="blog"/><category term="meta"/></entry><entry><title>The confusing Bash configuration files</title><link href="https://100things.wzzrd.com/2018/07/11/The-confusing-Bash-configuration-files.html" rel="alternate"/><published>2018-07-11T21:39:18+01:00</published><updated>2018-07-11T21:39:18+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2018-07-11:/2018/07/11/The-confusing-Bash-configuration-files.html</id><summary type="html">&lt;p&gt;This blog is mostly a reminder for my future self, because I always end up forgetting this.&lt;/p&gt;
&lt;p&gt;Bash has a bunch of configuration files it parsers through when you fire it up.&lt;/p&gt;
&lt;p&gt;Bash reads them in this order (on Fedora, and I suppose RHEL and derivatives too) if invoked as …&lt;/p&gt;</summary><content type="html">&lt;p&gt;This blog is mostly a reminder for my future self, because I always end up forgetting this.&lt;/p&gt;
&lt;p&gt;Bash has a bunch of configuration files it parsers through when you fire it up.&lt;/p&gt;
&lt;p&gt;Bash reads them in this order (on Fedora, and I suppose RHEL and derivatives too) if invoked as an interactive login shell (i.e. when you log into the system on the console, or through SSH):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/etc/profile&lt;/code&gt; (if it exists)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/.bash_profile&lt;/code&gt; (if it exists)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/.bash_login&lt;/code&gt; (if it exists, and ~/.bash_profile does not exist)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/.profile&lt;/code&gt; (if it exists, and if the above two files do not)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When exiting, the interactive login shell executes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;~/.bash_logout&lt;/code&gt; (if it exists)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/etc/bash.bash_logout&lt;/code&gt; (if it exists)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For an interactive non-login shell (that's when you start gnome-terminal or tilix in X or Wayland), Bash just executes &lt;code&gt;~/.bashrc&lt;/code&gt;, if it exists. (So, no, &lt;code&gt;/etc/bashrc&lt;/code&gt; is &lt;em&gt;not&lt;/em&gt; invoked by Bash itself, but usually through &lt;code&gt;~/.bashrc&lt;/code&gt;, which by default sources &lt;code&gt;/etc/bashrc&lt;/code&gt;.)&lt;/p&gt;
&lt;p&gt;Because this is odd, the default &lt;code&gt;~/.bash_profile&lt;/code&gt; actually sources &lt;code&gt;~/.bashrc&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;So for an interactive login shell, this happens (assuming the default config files from &lt;code&gt;/etc/skel&lt;/code&gt; on Fedora 28):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;/etc/profile&lt;/code&gt; is read, &lt;/li&gt;
&lt;li&gt;whatever is in &lt;code&gt;/etc/profile.d&lt;/code&gt; is included&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/etc/bashrc&lt;/code&gt; is included, and the &lt;code&gt;${BASHRCSOURCED}&lt;/code&gt; variable is set to Y &lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/.bash_profile&lt;/code&gt; is read&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/.bashrc&lt;/code&gt; is sourced through &lt;code&gt;~/.bash_profile&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/etc/bashrc&lt;/code&gt; is sourced, again, this time through &lt;code&gt;~/.bashrc&lt;/code&gt;, but it's not actually parsed again, because &lt;code&gt;${BASHRCSOURCED}&lt;/code&gt; was already set to Y&lt;/li&gt;
&lt;li&gt;neither &lt;code&gt;~/.bash_login&lt;/code&gt;, nor &lt;code&gt;~/.profile&lt;/code&gt; are sourced, because &lt;code&gt;~/.bash_profile&lt;/code&gt; exists&lt;/li&gt;
&lt;li&gt;You get your shell&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Finally, when Bash is invoked as the interpreter for a shell script, it will read &lt;code&gt;${BASH_ENV}&lt;/code&gt;, and it will read and execute the filename it finds in there. For Fedora 28, that's &lt;code&gt;/usr/share/Modules/init/bash&lt;/code&gt;, owned by the environment-modules package.&lt;/p&gt;
&lt;p&gt;Mind that this only happens if the shell script starts with the proper Bash shebang: &lt;code&gt;#!/bin/bash&lt;/code&gt; or &lt;code&gt;#!/usr/bin/bash&lt;/code&gt;, not with &lt;code&gt;#!/bin/sh&lt;/code&gt;. Starting your shell script with &lt;code&gt;#!/bin/sh&lt;/code&gt; will yield completely different results, as that will make Bash run in compatibility mode for old(er) shells.&lt;/p&gt;</content><category term="dev"/><category term="bash"/><category term="linux"/><category term="configuration"/><category term="notetofutureself"/></entry><entry><title>Running cockpit on a Satellite Capsule / Foreman Proxy</title><link href="https://100things.wzzrd.com/2018/06/27/Running-cockpit-on-a-Satellite-Capsule-Foreman-Proxy.html" rel="alternate"/><published>2018-06-27T13:51:11+01:00</published><updated>2018-06-27T13:51:11+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2018-06-27:/2018/06/27/Running-cockpit-on-a-Satellite-Capsule-Foreman-Proxy.html</id><summary type="html">&lt;p&gt;When I bought my new workstation - those Ryzen beasts are FAST! - I decided I would build my new lab properly, and with properly, I meant with proper SSL certificates for all apps.&lt;/p&gt;
&lt;p&gt;So I set up Red Hat IdM on a simple VM, and then imported the CA into my …&lt;/p&gt;</summary><content type="html">&lt;p&gt;When I bought my new workstation - those Ryzen beasts are FAST! - I decided I would build my new lab properly, and with properly, I meant with proper SSL certificates for all apps.&lt;/p&gt;
&lt;p&gt;So I set up Red Hat IdM on a simple VM, and then imported the CA into my browser. From that point on, all of my lab VMs are new running with a certificate signed by that CA. Nice green lock icons in my browser. Yay!&lt;/p&gt;
&lt;p&gt;I've built a RHV cluster, a Satellite 6 machine, with two Capsules, an Ansible Tower node, and more infrastructure, just to play with, all with proper certificates signed by my IdM CA.&lt;/p&gt;
&lt;p&gt;That last hurdle was to setup Cockpit on all my VMs, and use a proper certificate for that as well.&lt;/p&gt;
&lt;p&gt;For 'normal' VMs, that fairly easy, but my Capsules (and the Satellite itself) have processes that try to bind to the same port as Cockpit. &lt;/p&gt;
&lt;p&gt;The workaround is simple and solid, and I'm documenting it here for posterity:&lt;/p&gt;
&lt;p&gt;First, you install the Cockpit software itself:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;yum&lt;span class="w"&gt; &lt;/span&gt;-y&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;cockpit
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;But because Cockpit needs to bind on another port, we will override it's unit file (as root):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mkdir&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;/usr/lib/systemd/system/cockpit.socket
cat&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;lt;&amp;lt; EOF &amp;gt; /usr/lib/systemd/system/cockpit.socket/10-port.conf&lt;/span&gt;
&lt;span class="s"&gt;[Socket]&lt;/span&gt;
&lt;span class="s"&gt;# need to reset the list of ListenStreams first, else it becomes a list that still includes 9090&lt;/span&gt;
&lt;span class="s"&gt;ListenStream=&lt;/span&gt;
&lt;span class="s"&gt;ListenStream=10090&lt;/span&gt;
&lt;span class="s"&gt;EOF&lt;/span&gt;
systemctl&lt;span class="w"&gt; &lt;/span&gt;daemon-reload
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;We need to open a port for Cockpit to be reachable from the outside:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;# cockpit cannot run on 9090 on a capsule, because there&amp;#39;s a capsule process there already&lt;/span&gt;
$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;firewall-cmd&lt;span class="w"&gt; &lt;/span&gt;--add-port&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;10090&lt;/span&gt;/tcp&lt;span class="w"&gt; &lt;/span&gt;--permanent
$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;firewall-cmd&lt;span class="w"&gt; &lt;/span&gt;--reload
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And tell SELinux to actually allow Cockpit to bind to that port, too:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;semanage&lt;span class="w"&gt; &lt;/span&gt;port&lt;span class="w"&gt; &lt;/span&gt;-a&lt;span class="w"&gt; &lt;/span&gt;-t&lt;span class="w"&gt; &lt;/span&gt;websm_port_t&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;tcp&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;10090&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Finally, we'll use the Capsules certificate and private key (I stored them in /etc/capscerts) to create a single file that Cockpit will use (as root):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/etc/capscerts
$&lt;span class="w"&gt; &lt;/span&gt;cat&lt;span class="w"&gt; &lt;/span&gt;caps.crt&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;/etc/cockpit/ws-certs.d/caps.cert
$&lt;span class="w"&gt; &lt;/span&gt;cat&lt;span class="w"&gt; &lt;/span&gt;caps.key&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;/etc/cockpit/ws-certs.d/caps.cert
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Finally, we restart the Cockpit socket&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;systemctl&lt;span class="w"&gt; &lt;/span&gt;restart&lt;span class="w"&gt; &lt;/span&gt;cockpit.socket
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And we're done!&lt;/p&gt;</content><category term="satellite"/><category term="satellite"/><category term="capsule"/><category term="cockpit"/><category term="ssl"/><category term="certificates"/><category term="freeipa"/><category term="idm"/><category term="foreman"/></entry><entry><title>Using the ovirt_vms module with cloud_init</title><link href="https://100things.wzzrd.com/2018/04/10/Using-the-ovirt-vms-module-with-cloud-init.html" rel="alternate"/><published>2018-04-10T22:20:52+01:00</published><updated>2018-04-10T22:20:52+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2018-04-10:/2018/04/10/Using-the-ovirt-vms-module-with-cloud-init.html</id><summary type="html">&lt;p&gt;A quick blog today. I've been wrestling with the ovirt_vms module in Ansible 2.5. I wanted to deploy a RHEL VM from a template on a RHV 4.1 cluster and use cloud-init to customize the VM.&lt;/p&gt;
&lt;p&gt;The ovirt_vms module offers a cloud_init option that takes a custom_script parameter …&lt;/p&gt;</summary><content type="html">&lt;p&gt;A quick blog today. I've been wrestling with the ovirt_vms module in Ansible 2.5. I wanted to deploy a RHEL VM from a template on a RHV 4.1 cluster and use cloud-init to customize the VM.&lt;/p&gt;
&lt;p&gt;The ovirt_vms module offers a cloud_init option that takes a custom_script parameter. According to the docs, you can feed this parameter your script like so:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;create VM&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;ovirt_vms&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;myvm&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;ovirt_auth}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;...&lt;/span&gt;&lt;span class="p p-Indicator"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p p-Indicator"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;etc...&lt;/span&gt;&lt;span class="p p-Indicator"&gt;]&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;wait&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;yes&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;cloud_init&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;custom_script&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p p-Indicator"&gt;|&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="no"&gt;write_files:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="no"&gt;- path: /tmp/my-userdata.sh&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="no"&gt;permissions: &amp;#39;0755&amp;#39;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="no"&gt;content: |                                                        &lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="no"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="no"&gt;echo &amp;quot;foo&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;What this does not tell you, is that this userdata is never touched if you just drop it in the playbook like this. I mean, it makes sense, because you have to tell cloud-init to do something with the script, but the ovirt_vms documentation doesn't tell you how to do that. Therefore, the &lt;code&gt;/tmp/my-userdata.sh&lt;/code&gt; script will be created, but it will not be executed.&lt;/p&gt;
&lt;p&gt;After some experimenting, it turns out you have to pass the custom_script parameter a second statement after &lt;code&gt;write_files&lt;/code&gt;. You need to pass it &lt;code&gt;runcmd&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;So if anyone is stumbling across this like I did, here's how to make your cloud-init work with ovirt_vms:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;create VM&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;ovirt_vms&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;myvm&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;{{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;ovirt_auth}}&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p p-Indicator"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;...&lt;/span&gt;&lt;span class="p p-Indicator"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p p-Indicator"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;etc...&lt;/span&gt;&lt;span class="p p-Indicator"&gt;]&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;wait&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;yes&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;cloud_init&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;custom_script&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p p-Indicator"&gt;|&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="no"&gt;write_files:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="no"&gt;- path: /tmp/my-userdata.sh&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="no"&gt;permissions: &amp;#39;0755&amp;#39;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="no"&gt;content: |                                                        &lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="no"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="no"&gt;echo &amp;quot;foo&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="no"&gt;runcmd:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="no"&gt;- /tmp/my-userdata.sh&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This may be obvious if you write cloud-init things all day, but I don't usually spend much time doing that :)&lt;/p&gt;</content><category term="ansible"/><category term="ansible"/><category term="rhv"/><category term="ovirt"/><category term="cloud-init"/></entry><entry><title>Fencing RHV or oVirt nested hypervisors</title><link href="https://100things.wzzrd.com/2018/02/14/Fencing-RHV-or-o-Virt-nested-hypervisors.html" rel="alternate"/><published>2018-02-14T11:26:54+01:00</published><updated>2018-02-14T11:26:54+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2018-02-14:/2018/02/14/Fencing-RHV-or-o-Virt-nested-hypervisors.html</id><summary type="html">&lt;h1&gt;My setup&lt;/h1&gt;
&lt;p&gt;I have this nice AMD Ryzen ThreadRipper, with 64GiB or RAM. What I want to do is run RHV 4.1 in virtual machines, and be able to play around with nested virtualization, HA and fencing.&lt;/p&gt;
&lt;p&gt;Problem is, that my virtual machines will live on libvirt, and VMs …&lt;/p&gt;</summary><content type="html">&lt;h1&gt;My setup&lt;/h1&gt;
&lt;p&gt;I have this nice AMD Ryzen ThreadRipper, with 64GiB or RAM. What I want to do is run RHV 4.1 in virtual machines, and be able to play around with nested virtualization, HA and fencing.&lt;/p&gt;
&lt;p&gt;Problem is, that my virtual machines will live on libvirt, and VMs on libvirt do not have IPMI interfaces.&lt;/p&gt;
&lt;h1&gt;The solution&lt;/h1&gt;
&lt;p&gt;Enter virtualbmc! Stemming from the OpenStack project, virtualbmc is a small Python program that allows you to connect a virtual BMC interface to some of your VMs.&lt;/p&gt;
&lt;p&gt;The way it works, is as follows:&lt;/p&gt;
&lt;p&gt;You enable my copr, like njah:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;dnf&lt;span class="w"&gt; &lt;/span&gt;copr&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;enable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;wzzrd/virtualbmc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;and then you install the actual program, like njah:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;dnf&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;python2-virtualbmc&lt;span class="w"&gt; &lt;/span&gt;python-virtualbmc-doc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Virtualbmc will create a virtual BMC device for each VM you configure it for. If you, like me, want to have all BMC interfaces on the gateway of your virtual network, you need to choose a unique port for each virtual BMC interface. More below.&lt;/p&gt;
&lt;h2&gt;Configuring virtualbmc&lt;/h2&gt;
&lt;p&gt;Now you have to add virtual BMC interfaces to the VMs you want to control. For this, you need to pass the name of your VM, an address to bind to (optionally), a port to listen on, and a username and password to control the BMC.&lt;/p&gt;
&lt;p&gt;As said, I want all virtual BMCs to live on my virtual network gateway, 192.168.122.1, so I create the virtual BMC devices like njah:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;vbmc&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;rhv-node-01.deployment6.lan&lt;span class="w"&gt; &lt;/span&gt;--address&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;192&lt;/span&gt;.168.122.1&lt;span class="w"&gt; &lt;/span&gt;--port&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;7001&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--username&lt;span class="w"&gt; &lt;/span&gt;root&lt;span class="w"&gt; &lt;/span&gt;--password&lt;span class="w"&gt; &lt;/span&gt;foobar
$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;vbmc&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;rhv-node-02.deployment6.lan&lt;span class="w"&gt; &lt;/span&gt;--address&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;192&lt;/span&gt;.168.122.1&lt;span class="w"&gt; &lt;/span&gt;--port&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;7001&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--username&lt;span class="w"&gt; &lt;/span&gt;root&lt;span class="w"&gt; &lt;/span&gt;--password&lt;span class="w"&gt; &lt;/span&gt;foobar
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;My hypervisor VMs (the so-called L1 machines), are obviously called rhv-node-01.deployment6.lan and rhv-node-02.deployment6.lan.&lt;/p&gt;
&lt;h2&gt;Starting the virtual BMCs&lt;/h2&gt;
&lt;p&gt;After creating the interfaces, we can see them, like njah:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;vbmc&lt;span class="w"&gt; &lt;/span&gt;list
+-----------------------------+--------+---------------+------+
&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt;         &lt;/span&gt;Domain&lt;span class="w"&gt; &lt;/span&gt;name&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Status&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;Address&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Port&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
+-----------------------------+--------+---------------+------+
&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;rhv-node-01.deployment6.lan&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;down&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;192&lt;/span&gt;.168.122.1&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;7001&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;rhv-node-02.deployment6.lan&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;down&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;192&lt;/span&gt;.168.122.1&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;7002&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
+-----------------------------+--------+---------------+------+
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And we can then start them to be used in RHV:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;vbmc&lt;span class="w"&gt; &lt;/span&gt;start&lt;span class="w"&gt; &lt;/span&gt;rhv-node-01.deployment6.lan
$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;vbmc&lt;span class="w"&gt; &lt;/span&gt;start&lt;span class="w"&gt; &lt;/span&gt;rhv-node-02.deployment6.lan
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Which gives us njah:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;vbmc&lt;span class="w"&gt; &lt;/span&gt;list
+-----------------------------+--------+------------------+------+
&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt;         &lt;/span&gt;Domain&lt;span class="w"&gt; &lt;/span&gt;name&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;Status&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;Address&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Port&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
+-----------------------------+-----------+---------------+------+
&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;rhv-node-01.deployment6.lan&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;running&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;192&lt;/span&gt;.168.122.1&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;7001&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;rhv-node-02.deployment6.lan&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;running&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;192&lt;/span&gt;.168.122.1&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;7002&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
+-----------------------------+--------+------------------+------+
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Configuring power management for the RHV nodes&lt;/h2&gt;
&lt;p&gt;Now, start your VMs, and in RHVM, go into the power management interface for each hypervisor, and do the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add a power management interface of type IPMILAN.&lt;/li&gt;
&lt;li&gt;As the IP, pass the 192.168.122.1 the we used above (or your equivalent)&lt;/li&gt;
&lt;li&gt;As the username and password, pass the values we used above&lt;/li&gt;
&lt;li&gt;Now here comes the tricky bit: in the options field, for each hypervisor, add:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ipport=7001,lanplus=1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Change the port to reflect the port you have configured for this VM. &lt;/p&gt;
&lt;p&gt;It took me quite a bit of time to figure out the right options here. Hope this saves someone else a bunch of time!&lt;/p&gt;
&lt;p&gt;Happy testing!&lt;/p&gt;</content><category term="misc"/><category term="rhv"/><category term="ovirt"/><category term="fencing"/><category term="virtualbmc"/><category term="libvirt"/></entry><entry><title>Screencasts on Linux, part 2</title><link href="https://100things.wzzrd.com/2018/02/07/Screencasts-on-Linux-part-2.html" rel="alternate"/><published>2018-02-07T21:30:42+01:00</published><updated>2018-02-07T21:30:42+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2018-02-07:/2018/02/07/Screencasts-on-Linux-part-2.html</id><summary type="html">&lt;p&gt;A while back, I wrote a &lt;a href="http://100things.wzzrd.com/2017/06/21/Creating-screencasts-on-Linux.html"&gt;post&lt;/a&gt; comparing some screencasting and video editing software on Linux.&lt;/p&gt;
&lt;p&gt;I that post, I mentioned a couple of video editing programs that are available, and basically noted that - as far as video editing is concerned - things were painful on Linux, at least for me …&lt;/p&gt;</summary><content type="html">&lt;p&gt;A while back, I wrote a &lt;a href="http://100things.wzzrd.com/2017/06/21/Creating-screencasts-on-Linux.html"&gt;post&lt;/a&gt; comparing some screencasting and video editing software on Linux.&lt;/p&gt;
&lt;p&gt;I that post, I mentioned a couple of video editing programs that are available, and basically noted that - as far as video editing is concerned - things were painful on Linux, at least for me.&lt;/p&gt;
&lt;p&gt;Well, no more, it seems. I seem to have missed a beautiful, functional, easy to use, and relatively fast one, called &lt;a href="https://jliljebl.github.io/flowblade/"&gt;Flowblade&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I had never heard of it, and I haven't seen it mentioned on any of the sites I looked for video editing software reviews on. I only ran into it while browsing the available Flatpaks on &lt;a href="https://flathub.org/apps/"&gt;Flathub&lt;/a&gt;. However, it has been in development for a couple of years, and it's development seems active, though a bit dependent on a single coder.&lt;/p&gt;
&lt;p&gt;Having said that, I tip my hat to that single coder, who goes by the name of &lt;a href="https://github.com/jliljebl"&gt;jliljebl&lt;/a&gt;, because this software is A-MA-ZING!&lt;/p&gt;
&lt;p&gt;I'm not a professional video editor, so I've always struggled with other open source video editing software, and LightWorks, though good, is a bit steep for my occasional screencast editing, and not open source. (As an added problem, most of the open source video editing software crashed for me. They all crashed, all the time. That made me a sad panda.)&lt;/p&gt;
&lt;p&gt;Flowblade, however, is easy. All the required functionality is readily available, without having to jump through hoops or having to know all kinds of funky lingo. For things that were not immediately obvious to me (again: I'm still a noob in video editing), short tutorial videos are abundant on Youtube.&lt;/p&gt;
&lt;p&gt;All in all, if you are looking for a good, open source video editor, that's really easy to use and does actually not crash all the time (which was a novelty as well!), take a look at Flowblade. &lt;/p&gt;
&lt;p&gt;It's like drinking a frothy mixture of rainbow juice and happy pills, topped with sprinkles of joy!&lt;/p&gt;
&lt;p&gt;&lt;img alt="Flowblade in action" src="/images/flowblade.png"&gt;&lt;/p&gt;</content><category term="meta"/><category term="video editing"/><category term="open source"/></entry><entry><title>Having fun contributing to open source</title><link href="https://100things.wzzrd.com/2018/01/28/Having-fun-contributing-to-open-source.html" rel="alternate"/><published>2018-01-28T11:57:34+01:00</published><updated>2018-01-28T11:57:34+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2018-01-28:/2018/01/28/Having-fun-contributing-to-open-source.html</id><summary type="html">&lt;p&gt;(This blog was first published on LinkedIn.)&lt;/p&gt;
&lt;p&gt;Here's something I'm a little bit proud of: I have written an actual feature for Satellite 6, and that feature was merged today!&lt;/p&gt;
&lt;p&gt;As you might know, Satellite 6's upstream is in a combination of multiple products, most notably Katello and Foreman. There …&lt;/p&gt;</summary><content type="html">&lt;p&gt;(This blog was first published on LinkedIn.)&lt;/p&gt;
&lt;p&gt;Here's something I'm a little bit proud of: I have written an actual feature for Satellite 6, and that feature was merged today!&lt;/p&gt;
&lt;p&gt;As you might know, Satellite 6's upstream is in a combination of multiple products, most notably Katello and Foreman. There is a bit of client side tooling that goes with Katello and Foreman called katello-client-bootstrap.&lt;/p&gt;
&lt;p&gt;Katello-client-bootstrap is a Python script called bootstrap.py that makes it easy to connect existing systems to Katello and Foreman (and thus Satellite 6), which is why it is shipped as part of the official product.&lt;/p&gt;
&lt;p&gt;Over the past couple of months, I've been working with Satellite product management and engineering (specifically Rich Jerrido and Evgeni Golov) to get a patch I've written merged into that script.&lt;/p&gt;
&lt;p&gt;This &lt;a href="https://github.com/Katello/katello-client-bootstrap/pull/227"&gt;patch&lt;/a&gt; makes it possible to move an existing system from one internal or external Capsule to another (within the same infrastructure), without loosing it's subscription or other configuration options. It's part of the new 1.5.0 version of katello-client-bootstrap that was &lt;a href="http://www.outsidaz.org/2018/01/23/katello-client-bootstrap-1-5-0-released/"&gt;released&lt;/a&gt; today.&lt;/p&gt;
&lt;p&gt;Of course, I'm very happy to re-enforce my hacker credibility, and talk about that, but I mainly wanted to write this article to share some of the experiences related to writing a feature / patch for an open source project and what it takes to get it merged.&lt;/p&gt;
&lt;p&gt;In the category "things I have learned while contributing to open source", we have:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Don't be afraid to start from scratch if your code doesn't fit the master branch anymore, or has suffered from other forms of bit rot. Sometimes, it's easier to start over than to try and mash your changes into a vastly changed master branch.&lt;/li&gt;
&lt;li&gt;Don't give up. I started this patch set in March of 2017, and I started over from scratch in the Fall of 2017. Along the way, I had to incorporate a million comments. In the end though, getting feedback is what open source is all about, and everyone just wants what is best for the project. Just keep pushing forward. Listen to the feedback. You'll get there.&lt;/li&gt;
&lt;li&gt;Talk to the project maintainers. This was relatively easy for me, because I personally know the people who maintain katello-bootstrap-client, but still, it's important to explain what it is you are trying to get merged, why your code behaves the way it does, etc. This makes it a lot easier to get people to review your pull request and give you valuable feedback.&lt;/li&gt;
&lt;li&gt;Learn git. In this day and ago, git is the tool for version control. If you want to contribute to any project whatsoever, you need to learn git. Learn branching, rebasing, squashing and writing decent commit messages (see #3).&lt;/li&gt;
&lt;li&gt;Finally, adhere to the project's coding standards, and use the project's testing framework, preferably before you commit. In my case, just running the 'pep8' tool on my code helped a lot in making the Travis CI tool happy.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;But above all: have fun! Contributing to open source can be very rewarding, and it's a fun way to do something different outside of your normal, everyday routine :)&lt;/p&gt;
&lt;p&gt;This was not my first patch to an open source project, but I think it was a fairly significant one. I'm looking forward to merging more in the future! :)&lt;/p&gt;
&lt;p&gt;A video with an overview and demo of the new feature is available on YouTube:&lt;/p&gt;
&lt;p&gt;{% youtube h-wonjChaxI %}&lt;/p&gt;</content><category term="satellite"/><category term="open source"/><category term="satellite6"/><category term="life at redhat"/><category term="katello-client-bootstrap"/><category term="youtube"/></entry><entry><title>"User-friendly" Windows</title><link href="https://100things.wzzrd.com/2018/01/28/User-friendly-Windows.html" rel="alternate"/><published>2018-01-28T11:50:00+01:00</published><updated>2018-01-28T11:50:00+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2018-01-28:/2018/01/28/User-friendly-Windows.html</id><summary type="html">&lt;p&gt;== This is a rant&lt;/p&gt;
&lt;p&gt;If you are not into rants, go away now.&lt;/p&gt;
&lt;p&gt;So for some app my kids want to use, I needed to setup Windows. And a printer. I have a Samsung M2070W, and I have had it for years. It has not always been easy to use …&lt;/p&gt;</summary><content type="html">&lt;p&gt;== This is a rant&lt;/p&gt;
&lt;p&gt;If you are not into rants, go away now.&lt;/p&gt;
&lt;p&gt;So for some app my kids want to use, I needed to setup Windows. And a printer. I have a Samsung M2070W, and I have had it for years. It has not always been easy to use (hell no!), but it generally works after a few kicks in the groin.&lt;/p&gt;
&lt;p&gt;I've used it with my iPad, with various Android devices, and various Linux distributions. And now, I needed to set it up in Windows.&lt;/p&gt;
&lt;p&gt;== Finding the right software&lt;/p&gt;
&lt;p&gt;I go to the Samung website to download drivers. Samsung seems to have sold it's printer business to HP. I go to HP's website. I search for my printer, and I get four different packages (one 'universal driver, one eco driver, one printer specific driver labeled 'no installer', and one printer specific driver without any additional information) I can choose from. &lt;/p&gt;
&lt;p&gt;I don't know which one to use, so I download them all. &lt;/p&gt;
&lt;p&gt;== Welcome to hell&lt;/p&gt;
&lt;p&gt;Now here's the really annoying bit. No matter what I do, the drivers keep telling me there's no printer in the network they can work with.&lt;/p&gt;
&lt;p&gt;It's basically a repetition of 'nope, no printers here', in, in the best case: 'hey, there's a printer here, oh wait no there isn't, oh wait yes there is, but I cannot use it'.&lt;/p&gt;
&lt;p&gt;I can open the printer's management page in my browser, I can connect to it through the app, but any and all drivers keep telling me 'nope, no printers here, move along', or something along the lines of 'device cannot be identified'.&lt;/p&gt;
&lt;p&gt;== Force install!&lt;/p&gt;
&lt;p&gt;As the final resort, I told it to skip detecting the printer, and just install what I told it to install.&lt;/p&gt;
&lt;p&gt;Want to know how that went? Driver got installed, I went to the 'add printer' page, and search for a printer. A printer is found just fine, but Windows then tells me 'driver unavaible' and we're back to square one.&lt;/p&gt;
&lt;p&gt;== The solution: SNM-f***ing-P&lt;/p&gt;
&lt;p&gt;I kid you not. You know what needed to be done on the printer to finally enable using it through Windows, in a semi-stable fashion? Enable SNMP on it. I turned that off at some point, I think (or maybe it's not on by default, I don't know), but without SNMP, no printer detection on Windows. It works fine on Android and iOS and on Linux, but not on Windows. FFS. &lt;/p&gt;
&lt;p&gt;== Microsoft's fault?&lt;/p&gt;
&lt;p&gt;I don't know. This driver mess is probably more Samsung's than Microsoft's fault, I guess. Unless you count the fact that many devices need vendor drivers to begin with, because Windows doesn't ship with them.&lt;/p&gt;
&lt;p&gt;Well anyway, luckily, Linux seems to identify and use my printer just fine. With or without SNMP on the printer. Now where's that reboot button...&lt;/p&gt;</content><category term="misc"/><category term="windows"/><category term="printing"/><category term="driverhell"/></entry><entry><title>Command Line Heroes</title><link href="https://100things.wzzrd.com/2018/01/16/Command-Line-Heroes.html" rel="alternate"/><published>2018-01-16T08:40:06+01:00</published><updated>2018-01-16T08:40:06+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2018-01-16:/2018/01/16/Command-Line-Heroes.html</id><summary type="html">&lt;p&gt;I've been looking forward to this for quite a while, ever since it was announced: today, the first two episodes of Command Line Heroes were published. Command Line Heroes, or CLH for short, is a series of podcasts that tells the stories of open source. It's hosted by Saron Yitbarek …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've been looking forward to this for quite a while, ever since it was announced: today, the first two episodes of Command Line Heroes were published. Command Line Heroes, or CLH for short, is a series of podcasts that tells the stories of open source. It's hosted by Saron Yitbarek, of CodeNewbie fame, and sponsored by Red Hat.&lt;/p&gt;
&lt;p&gt;The podcast is not about how to create an alias in Bash, or how to generate a CSR with openssl. It is about the history of Linux, open source, devops and cloud.&lt;/p&gt;
&lt;p&gt;If you're a geek, a hacker, a developer, a programmer, or any other sort of passionat open source builder, maker, or user, you'll definitely want to look into this. &lt;/p&gt;
&lt;p&gt;The first episode is about the OS wars of the 80s and how Linux came to be. I'm listening to it right now, and it's worth every second :)&lt;/p&gt;
&lt;p&gt;You can sign up for the newletter around Command Line Heroes &lt;a href="https://www.redhat.com/en/command-line-heroes"&gt;here&lt;/a&gt;, or just pull the &lt;a href="https://feeds.pacific-content.com/commandlineheroes"&gt;RSS feed&lt;/a&gt; into your favorite podcast client.&lt;/p&gt;</content><category term="misc"/><category term="podcast"/><category term="open source"/><category term="red-hat"/><category term="women in tech"/></entry><entry><title>Demystifying Activation Keys</title><link href="https://100things.wzzrd.com/2017/07/10/Demystifying-Activation-Keys.html" rel="alternate"/><published>2017-07-10T16:51:11+01:00</published><updated>2017-07-10T16:51:11+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2017-07-10:/2017/07/10/Demystifying-Activation-Keys.html</id><summary type="html">&lt;p&gt;In my daily work as a solutions architect for Red Hat, I regularly talk about Satellite 6 and explain to people how activation keys work, and how to best assign subscriptions to newly created virtual or physical machines.&lt;/p&gt;
&lt;p&gt;Setting up activation keys is not rocket science, but I have learned …&lt;/p&gt;</summary><content type="html">&lt;p&gt;In my daily work as a solutions architect for Red Hat, I regularly talk about Satellite 6 and explain to people how activation keys work, and how to best assign subscriptions to newly created virtual or physical machines.&lt;/p&gt;
&lt;p&gt;Setting up activation keys is not rocket science, but I have learned that there are some misunderstandings around it, and I though it would make sense to create a short video about it.&lt;/p&gt;
&lt;p&gt;(Now, when I say "short", I mean that I have &lt;em&gt;tried&lt;/em&gt; to keep it short, not that I have actually succeeded in doing that. The video in this case is about 10 minutes in length, which still counts as short-ish, I hope.)&lt;/p&gt;
&lt;p&gt;If you are interested in this topic, take a look at the video below&lt;/p&gt;
&lt;p&gt;{% youtube byIf3Vb8sS0 %}&lt;/p&gt;
&lt;p&gt;The video itself is based of an article written by Rich Jerrido, which you can find &lt;a href="https://access.redhat.com/blogs/1169563/posts/2867891"&gt;here&lt;/a&gt;. It has some more in-depth information, where the video mostly shows examples.&lt;/p&gt;</content><category term="satellite"/><category term="satellite6"/><category term="youtube"/><category term="virt-who"/><category term="vdc"/><category term="subscriptions"/><category term="activation-keys"/></entry><entry><title>Building ipa-server for aarch64 on a Raspberry Pi 3 and CentOS7</title><link href="https://100things.wzzrd.com/2017/07/10/Building-ipa-server-for-aarch64-on-a-Raspberry-Pi-3-and-CentO-S.html" rel="alternate"/><published>2017-07-10T10:42:50+01:00</published><updated>2017-07-10T10:42:50+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2017-07-10:/2017/07/10/Building-ipa-server-for-aarch64-on-a-Raspberry-Pi-3-and-CentO-S.html</id><summary type="html">&lt;h1&gt;What?&lt;/h1&gt;
&lt;p&gt;I want to run IPA server (FreeIPA, IdM) on my Raspberry Pi 3. This allows me to connect Satellite servers, Ansible Tower servers and whatnot to an instance of IdM that I don't have to setup everytime, is always running and is actually used.&lt;/p&gt;
&lt;h1&gt;Is there a problem?&lt;/h1&gt;
&lt;p&gt;A …&lt;/p&gt;</summary><content type="html">&lt;h1&gt;What?&lt;/h1&gt;
&lt;p&gt;I want to run IPA server (FreeIPA, IdM) on my Raspberry Pi 3. This allows me to connect Satellite servers, Ansible Tower servers and whatnot to an instance of IdM that I don't have to setup everytime, is always running and is actually used.&lt;/p&gt;
&lt;h1&gt;Is there a problem?&lt;/h1&gt;
&lt;p&gt;A bit. The specfile for ipa-server has a line reading &lt;code&gt;%ifarch x86_64 %{ix86}&lt;/code&gt;. This will prevent building ipa-server on any platform except for x86_64. I'm not sure why this is, but it means I have to build the RPM myself. And luckily for me, it builds fine :)&lt;/p&gt;
&lt;h1&gt;The setup&lt;/h1&gt;
&lt;p&gt;My RPi3 runs CentOS7 for aarch64, based on the image that is available for download &lt;a href="https://www.kraxel.org/repos/images/arm64-rpi3-centos7-mainline-20160803.raw.xz"&gt;here&lt;/a&gt;. All in all, it works pretty well, with some caveats. One of those caveats is that the standard mock RPM doesn't provide a configuration file for aarch64. &lt;/p&gt;
&lt;p&gt;Hence, if you want to start using mock to build RPMs on your RPi3, create a file called &lt;code&gt;epel-7-aarch64.cfg&lt;/code&gt; and put the following content in it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="na"&gt;config_opts[&amp;#39;root&amp;#39;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;epel-7-aarch64&amp;#39;&lt;/span&gt;
&lt;span class="na"&gt;config_opts[&amp;#39;target_arch&amp;#39;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;aarch64&amp;#39;&lt;/span&gt;
&lt;span class="na"&gt;config_opts[&amp;#39;legal_host_arches&amp;#39;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;(&amp;#39;aarch64&amp;#39;,)&lt;/span&gt;
&lt;span class="na"&gt;config_opts[&amp;#39;chroot_setup_cmd&amp;#39;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;install bash bzip2 coreutils cpio diffutils fedora-release findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz python&amp;#39;&lt;/span&gt;
&lt;span class="na"&gt;config_opts[&amp;#39;dist&amp;#39;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;el7&amp;#39;&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="c1"&gt;# only useful for --resultdir variable subst&lt;/span&gt;
&lt;span class="na"&gt;config_opts[&amp;#39;extra_chroot_dirs&amp;#39;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;[ &amp;#39;/run/lock&amp;#39;, ]&lt;/span&gt;
&lt;span class="na"&gt;config_opts[&amp;#39;releasever&amp;#39;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;7&amp;#39;&lt;/span&gt;

&lt;span class="na"&gt;config_opts[&amp;#39;yum.conf&amp;#39;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="na"&gt;&amp;quot;&lt;/span&gt;
&lt;span class="k"&gt;[main]&lt;/span&gt;
&lt;span class="na"&gt;keepcache&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;
&lt;span class="na"&gt;debuglevel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;1&lt;/span&gt;
&lt;span class="na"&gt;reposdir&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/dev/null&lt;/span&gt;
&lt;span class="na"&gt;logfile&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/log/yum.log&lt;/span&gt;
&lt;span class="na"&gt;retries&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;20&lt;/span&gt;
&lt;span class="na"&gt;obsoletes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;1&lt;/span&gt;
&lt;span class="na"&gt;gpgcheck&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;
&lt;span class="na"&gt;assumeyes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;1&lt;/span&gt;
&lt;span class="na"&gt;syslog_ident&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;mock&lt;/span&gt;
&lt;span class="na"&gt;syslog_device&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;
&lt;span class="na"&gt;install_weak_deps&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;
&lt;span class="na"&gt;metadata_expire&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;

&lt;span class="c1"&gt;# repos&lt;/span&gt;

&lt;span class="k"&gt;[base]&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;centos-base&lt;/span&gt;
&lt;span class="na"&gt;baseurl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;http://mirror.centos.org/altarch/$releasever/os/$basearch/&lt;/span&gt;
&lt;span class="na"&gt;failovermethod&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;priority&lt;/span&gt;
&lt;span class="na"&gt;gpgcheck&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;1&lt;/span&gt;
&lt;span class="na"&gt;gpgkey&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7&lt;/span&gt;
&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="na"&gt;file&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s"&gt;///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64&lt;/span&gt;

&lt;span class="k"&gt;[updates]&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;updates&lt;/span&gt;
&lt;span class="na"&gt;baseurl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;http://mirror.centos.org/altarch/$releasever/updates/$basearch/&lt;/span&gt;
&lt;span class="na"&gt;failovermethod&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;priority&lt;/span&gt;
&lt;span class="na"&gt;gpgcheck&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;1&lt;/span&gt;
&lt;span class="na"&gt;gpgkey&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7&lt;/span&gt;
&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="na"&gt;file&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s"&gt;///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64&lt;/span&gt;

&lt;span class="k"&gt;[extras]&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;CentOS-$releasever - Extras&lt;/span&gt;
&lt;span class="na"&gt;baseurl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;http://mirror.centos.org/altarch/$releasever/extras/$basearch/&lt;/span&gt;
&lt;span class="na"&gt;gpgcheck&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;1&lt;/span&gt;
&lt;span class="na"&gt;gpgkey&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7&lt;/span&gt;
&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="na"&gt;file&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s"&gt;///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64&lt;/span&gt;
&lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;

&lt;span class="k"&gt;[epel]&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;epel&lt;/span&gt;
&lt;span class="na"&gt;mirrorlist&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;http://mirrors.fedoraproject.org/mirrorlist?repo=epel-7&amp;amp;arch=aarch64&lt;/span&gt;
&lt;span class="na"&gt;failovermethod&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;priority&lt;/span&gt;
&lt;span class="na"&gt;gpgkey&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;file:///etc/pki/mock/RPM-GPG-KEY-EPEL-7&lt;/span&gt;
&lt;span class="na"&gt;gpgcheck&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;1&lt;/span&gt;

&lt;span class="k"&gt;[kraxel-qcom-rpi3-public]&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;kraxels qcom dragonboard / rpi3 rpms [public]&lt;/span&gt;
&lt;span class="na"&gt;baseurl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;https://www.kraxel.org/repos/qcom/&lt;/span&gt;
&lt;span class="na"&gt;gpgcheck&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;
&lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;1&lt;/span&gt;

&lt;span class="k"&gt;[local]&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;local&lt;/span&gt;
&lt;span class="na"&gt;baseurl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;http://armpkgs.fedoraproject.org/repos/f23-build/latest/aarch64/&lt;/span&gt;
&lt;span class="na"&gt;cost&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;2000&lt;/span&gt;
&lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;
&lt;span class="na"&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You really need to enable EPEL here, because that's where mock can pull ccache from. Also, I added the kraxel repository to this a long time ago, but I can't really remember why :)&lt;/p&gt;
&lt;h1&gt;The specfile&lt;/h1&gt;
&lt;p&gt;Nothing really spectacular here. Just go to http://vault.centos.org/ and download that latest source RPM for ipa-server. At the time of writing, this is the http://vault.centos.org/centos/7.3.1611/updates/Source/SPackages/ipa-4.4.0-14.el7.centos.7.src.rpm[latest version].&lt;/p&gt;
&lt;p&gt;Install the source RPM as an unpriviliged user and enter the newly created ~/rpmbuild/SPECS directory. Open the ipa.spec and make sure you edit the following lines.&lt;/p&gt;
&lt;p&gt;Edit the line reading &lt;code&gt;%ifarch x86_64 %{ix86}&lt;/code&gt; to read &lt;code&gt;%ifarch x86_64 %{ix86} aarch64&lt;/code&gt;. In the version of the specfile I'm working with, that is line 12.&lt;/p&gt;
&lt;p&gt;Edit the line reading &lt;code&gt;Release:       14%{?dist}.7&lt;/code&gt; to read &lt;code&gt;Release:        14%{?dist}.7identifier&lt;/code&gt;. I usually use &lt;code&gt;maxim&lt;/code&gt; as my identifier. You need add this to distinguish your version of the resulting RPMs (e.g. ipa-client) from the version supplied by the official repositories.footnote:[Obviously, the version numbers you see here are specific to the version of the specfile I'm using right now.] This is at line 46 in my specfile.&lt;/p&gt;
&lt;p&gt;Then, finally, add a new entry in the &lt;code&gt;%changelog&lt;/code&gt; section (starting at line 1551 for me). Make sure you reference the right version of the RPM. My last one looks like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Mon&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Jul&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2017&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Maxim&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Burgerhout&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;maxim&lt;/span&gt;&lt;span class="nv"&gt;@redhat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;4.4.0&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;14.&lt;/span&gt;&lt;span class="n"&gt;el7&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;centos&lt;/span&gt;&lt;span class="mf"&gt;.7&lt;/span&gt;&lt;span class="n"&gt;maxim&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Enable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ipa&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;aarch64&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h1&gt;Creating the source RPM&lt;/h1&gt;
&lt;p&gt;This part is easy. From the ~/rpmbuild/SPECS directory, just run &lt;code&gt;rpmbuild -bs ipa.spec&lt;/code&gt;. An SRPM package will be available in ~/rpmbuild/SRPMS afterwards.&lt;/p&gt;
&lt;h1&gt;Building the actual RPMs&lt;/h1&gt;
&lt;p&gt;We want to use mock to build our RPMs, so I would call this command. Change for your username and identifier:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mock&lt;span class="w"&gt; &lt;/span&gt;-r&lt;span class="w"&gt; &lt;/span&gt;epel-7-aarch64&lt;span class="w"&gt; &lt;/span&gt;/home/maxim/rpmbuild/SRPMS/ipa-4.4.0-14.el7.centos.7maxim.src.rpm
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h1&gt;Installing the results&lt;/h1&gt;
&lt;p&gt;After building (which will take a while), the resulting RPMs will be available in &lt;code&gt;/var/lib/mock/centos-7-aarch64/result&lt;/code&gt;. I usually go in there and run &lt;code&gt;sudo createrepo .&lt;/code&gt; and then add a ipa.repo configuration file to /etc/yum.repos.d that reads:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[ipa]&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;CentOS-$releasever - IPA&lt;/span&gt;
&lt;span class="na"&gt;baseurl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;file:///var/lib/mock/epel-7-aarch64/result&lt;/span&gt;
&lt;span class="na"&gt;gpgcheck&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;That allows me to use yum to install everything and solve dependencies for me.&lt;/p&gt;
&lt;h1&gt;Profit!&lt;/h1&gt;
&lt;p&gt;This may not be useful for everyone, but for me, it's great to have an FreeIPA / IdM server running on my RPi3 :)&lt;/p&gt;
&lt;p&gt;This blog is as much for me (as I tend to forget how I built it the last time around) as it is for anyone else looking to run FreeIPA / IdM on an RPi3. Enjoy!&lt;/p&gt;</content><category term="dev"/><category term="centos"/><category term="freeipa"/><category term="idm"/><category term="mock"/><category term="rpm"/></entry><entry><title>Open source is the most important motor for innovation</title><link href="https://100things.wzzrd.com/2017/07/03/Open-source-is-the-most-important-motor-for-innovation.html" rel="alternate"/><published>2017-07-03T14:00:43+01:00</published><updated>2017-07-03T14:00:43+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2017-07-03:/2017/07/03/Open-source-is-the-most-important-motor-for-innovation.html</id><summary type="html">&lt;p&gt;Recently, during the OpenTechDay in Utrecht, I had the opportunity to share my passion for open source. Since I didn’t need to convince the open source audience, I decided instead to focus on the open source success story. How far have we come since the beginning and where are …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Recently, during the OpenTechDay in Utrecht, I had the opportunity to share my passion for open source. Since I didn’t need to convince the open source audience, I decided instead to focus on the open source success story. How far have we come since the beginning and where are we going? I think we, as a community, should be proud of the huge success of open source and also its ability to capture the cloud. &lt;/p&gt;
&lt;p&gt;Open source has a longer history than you would think. Some of the first computers from the 1960s were provided with software that could be freely customized and shared with other users. In the 1970s, the software world accelerated with the birth of the Internet, the programming language C and UNIX.&lt;/p&gt;
&lt;p&gt;Through the GNU project by Richard Stallman and Linux from Linus Torvalds, started in the 1980s and 1990s respectively, open source became a serious alternative to proprietary software. But that isn’t all. Numerous open source projects have since been launched and the number is growing by the day.&lt;/p&gt;
&lt;p&gt;However, open source was put down, for several decades, as the enemy of commercial software and the work of hobbyists. That image has changed dramatically and this is demonstrated by the fact that open source is now being used everywhere, from smartphones and routers to servers and complete data centers. Open source is literally the driving force behind all current and future innovations.&lt;/p&gt;
&lt;p&gt;== More than an operating system&lt;/p&gt;
&lt;p&gt;Open source is definitely not just about software and operating systems. Virtually all modern programming languages and open standards are part of it. Yet, there are still people who think open source is not valuable in the world of public clouds. I must quickly dispel this myth, as open source is on its way to becoming the de facto standard for cloud infrastructure.&lt;/p&gt;
&lt;p&gt;From private and public to hybrid clouds -- open standards and technology like OpenStack and Linux containers make these environments flexibly interchangeable. Organizations are no longer hampered by the restrictions that traditional software vendors have in terms of integration or platform support. With open source, they benefit from the commitment of the dynamic community projects on which this technology is based. The innovation speed is many times higher than that of a proprietary software supplier, who develops behind closed doors with a small team of developers.&lt;/p&gt;
&lt;p&gt;== Embrace the community&lt;/p&gt;
&lt;p&gt;Those who think they aren’t part of an open source community are likely mistaken. By using open source software, you are contributing to testing and making the project successful.&lt;/p&gt;
&lt;p&gt;Companies also seem to increasingly realize this. By using open source software, they become part of that huge community. Together with other companies, individual developers, suppliers and partners, they all work for the same purpose: developing better technology in an open way. They can therefore participate in testing, developing and improving the software that further helps their organization.&lt;/p&gt;
&lt;p&gt;That gets even stronger as companies use more cloud services. Building a business infrastructure on an open source foundation makes it much easier to move to a cloud or data center where open source is also the default.&lt;/p&gt;
&lt;p&gt;I talk to companies that are busy transitioning to open source, both on premise and in the cloud on a daily basis. Obviously, these kinds of technological changes are not without challenges, but here you can count on the support of open source companies and communities.&lt;/p&gt;
&lt;p&gt;In conclusion, I’ll say that companies can’t go around open source in the long run. For both traditional software and the cloud, it is quickly becoming the standard for rapid innovation and development. That’s an especially good reason to 
start using this innovation engine right now.&lt;/p&gt;
&lt;p&gt;This blog was also published on &lt;a href="https://www.linkedin.com/pulse/open-source-most-important-motor-innovation-maxim-burgerhout"&gt;LinkedIn&lt;/a&gt; and &lt;a href="https://www.computable.nl/artikel/blogs/opensource/6050245/5260614/opensource-is-belangrijkste-motor-voor-innovatie.html"&gt;Computable&lt;/a&gt; (in Dutch).&lt;/p&gt;</content><category term="article"/><category term="open source"/></entry><entry><title>Creating screencasts on Linux</title><link href="https://100things.wzzrd.com/2017/06/21/Creating-screencasts-on-Linux.html" rel="alternate"/><published>2017-06-21T16:19:33+01:00</published><updated>2017-06-21T16:19:33+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2017-06-21:/2017/06/21/Creating-screencasts-on-Linux.html</id><summary type="html">&lt;p&gt;== Intro&lt;/p&gt;
&lt;p&gt;As this is a new blog on Fedora Planet, let me start off by introducing myself briefly. My name is Maxim Burgerhout, and I have been a Fedora contributor for quite some time. Truth be told though, I haven't been able to spend much time maintaining my packages over …&lt;/p&gt;</summary><content type="html">&lt;p&gt;== Intro&lt;/p&gt;
&lt;p&gt;As this is a new blog on Fedora Planet, let me start off by introducing myself briefly. My name is Maxim Burgerhout, and I have been a Fedora contributor for quite some time. Truth be told though, I haven't been able to spend much time maintaining my packages over the past couple of years. As a different way of giving back, I want to start sharing some experiences with open source software in a specific niche: screencast creation, and video editing.&lt;/p&gt;
&lt;p&gt;== Background&lt;/p&gt;
&lt;p&gt;A couple of months back, I started recording screencasts about Red Hat products&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt;. For now, it's mostly about management products, like Satellite, Ansible Tower and things like that, but I'll potentially also cover other products and projects as they pop up in my daily work, and as said above, I intend to start sharing some experiences&lt;sup id="fnref:2"&gt;&lt;a class="footnote-ref" href="#fn:2"&gt;2&lt;/a&gt;&lt;/sup&gt; about creating screencasts on Fedora.&lt;/p&gt;
&lt;p&gt;Assuming more people are trying to figure out the same things I am, I'm starting off with a short write-up of my experiences so far, trying to work with open source software to create screencasts. Spoiler: it's not as easy as I hoped it would be. &lt;/p&gt;
&lt;p&gt;The below article is based on my experience using Fedora 25.&lt;/p&gt;
&lt;p&gt;== Recording video&lt;/p&gt;
&lt;p&gt;Ever since I started doing this, I've been using &lt;a href="http://screencastify.com/"&gt;Screencastify&lt;/a&gt; as my screen recorder of choice. I have tried using the &lt;a href="https://extensions.gnome.org/extension/690/easyscreencast/"&gt;EasyScreencast&lt;/a&gt; Gnome Shell extension in the beginning, but it had (temporarily) died, so that didn't seem viable. It seems to have revived though, so I'll probably try it again when my Screencastify subscription expires near the end of the calendar year.&lt;/p&gt;
&lt;p&gt;I also tried the &lt;a href="https://help.gnome.org/users/gnome-help/stable/screen-shot-record.html.en"&gt;CTRL-ALT-SHIFT-R&lt;/a&gt; option to start a screencast recording in Gnome, but that records both my monitors, which makes editing the whole thing into a Youtube video quite a pain&lt;sup id="fnref:3"&gt;&lt;a class="footnote-ref" href="#fn:3"&gt;3&lt;/a&gt;&lt;/sup&gt;. Finally, gtk-recordmydesktop gives me all kinds of strange artifacts in my recording when I move my mouse. It also seemed to crash quite frequently, and seems to be dead upstream.&lt;/p&gt;
&lt;p&gt;All options available from the community (the built-in one, gtk-recordmydesktop and EasyScreencast) were disqualified for various reasons, either because of lack of maintenance, quircks or instability.&lt;/p&gt;
&lt;p&gt;However, apart from the occasional crash (which happens very seldomly), Screencastify works beautifully. I can record a window, a Chrome tab, or my whole desktop. Recording my voice over the videos also works pretty well, using a USB microphone I bought for the purpose of creating screencasts.&lt;/p&gt;
&lt;p&gt;The downside of Screencastify is that it's a proprietary piece of software. For now, it's the clear winner, but in the future I'll give EasyScreencast a go for it's money again.&lt;/p&gt;
&lt;p&gt;== Recording audio on it's own&lt;/p&gt;
&lt;p&gt;Recording audio on Fedora can be done through various options, of which the two most obvious are &lt;a href="https://wiki.gnome.org/Design/Apps/SoundRecorder"&gt;Sound Recorder&lt;/a&gt; and &lt;a href="http://www.audacityteam.org/"&gt;Audacity&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Sound Recorder is the default sound recorder app in Gnome 3. It's OK for very simple usage, but the moment you want to start editing audio or improving audio quality using filters, Sound Recorder doesn't offer anything.&lt;/p&gt;
&lt;p&gt;Audacity on the contrary, is &lt;em&gt;very&lt;/em&gt; complete. It's even a bit intimidating in the amount of options it offers, but in terms of recording quality, editing the recordings and improving their quality, Audacity is the de-facto standard in open source, on Linux as well as on various other platforms. Simply said, it's brilliant.&lt;/p&gt;
&lt;p&gt;Audacity is the clear winner hear, without any real competition.&lt;/p&gt;
&lt;p&gt;== Editing video&lt;/p&gt;
&lt;p&gt;So this is where the real pain starts. Save to say, video editing on Linux was a bit of a disappointment for me.&lt;/p&gt;
&lt;p&gt;I have tried all of the major video editing open source projects that available natively on Fedora: Kdenlive, Pitivi, Avidemux and OpenShot, as well as the commercially available Lightworks.&lt;/p&gt;
&lt;p&gt;To start with &lt;a href="http://fixounet.free.fr/avidemux/"&gt;Avidemux&lt;/a&gt;: it seems to lack the full broad spectrum of features one would need to edit and merge large amounts of clips into a new video, and insert transitions and background audio. I assume it would work nicely to just crop two videos and slam them together, but it doesn't feel right for more complex things. Granted, I haven't spent a huge amount with this program, so let me know if you think I'm dismissing Avidemux too easily. It just wasn't enough for me.&lt;/p&gt;
&lt;p&gt;Next up are &lt;a href="http://www.openshot.org/"&gt;OpenShot&lt;/a&gt; and &lt;a href="https://kdenlive.org/"&gt;Kdenlive&lt;/a&gt;. Both great programs, both with extensive feature sets that would suffice for me and both with the same continuous problem that disqualified them: they crash. Over and over. I'll be filing bugs for both, but no matter how that turns out, right NOW, they are not very useful for me. Both seem to have somewhat lively upstreams tho, so who knows what the future might bring. &lt;/p&gt;
&lt;p&gt;Sadly, I've spent too much time trying to get OpenShoft and Kdenlive to work, and that kept me from thoroughly evaluating my next contender: &lt;a href="http://www.pitivi.org/"&gt;Pitivi&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Pitivi used to fall into the same category as OpenShoft and Kdenlive (crashing), but I haven't experienced any crashes recently. I comes with a nice set of effects, just like OpenShoft and Kdenlive, and is fairly easy to use. It exports to all of the right formats, but sadly, rendering of video happens in the foreground. This blocksyou from using the program during that process. Not a big deal for a video of a couple of minutes, but annoying for anything longer than that.&lt;/p&gt;
&lt;p&gt;The final program I just had to take a look at, is Lightworks. It's not open source, but it really is bloody good. It's by far the most complete of the lot, but it comes at a hefty price. Also, some of the options that are really interesting for making screencasts, like a built-in voice-over recorder, isn't available on Linux :(&lt;/p&gt;
&lt;p&gt;I would say for video editing, Pitivi and Lightworks are tied, with Lightworks being the more complete option, and Pitivi being the open source one.&lt;/p&gt;
&lt;p&gt;== Conclusion&lt;/p&gt;
&lt;p&gt;Audio editing we have under control in open source. Audacity is great. It's just really, really great. (There, enough Trumpianisms for today.)&lt;/p&gt;
&lt;p&gt;Screencast recording has come a long way, but hasn't quite reached the level of functionality I needed a couple of months back. It might have grown to that level in the meantime, though. I'll take the time to re-evaluate EasyScreencast and post an update sometime in the Fall.&lt;/p&gt;
&lt;p&gt;Video editing is still a bit of a problem. The commercial option is good, but pretty expensive and obviously not open source. Two of the three main contenders (OpenShot and Kdenlive) have serious stability issues, up to the point that I just gave up on them. Bugs will be filed, but that's not helping me today. Pitivi is a little less complete than both OpenShot and Kdenlive, I think, but does show promise (and doesn't crash that often). &lt;/p&gt;
&lt;p&gt;As with EasyScreencast, I'll give Pitivi as second try and hopefully find an open source solution for my video editing problem.&lt;/p&gt;
&lt;p&gt;TL;DR if you are looking for a set of tools to record and edit screencasts on Fedora, you probably want to check out EasyScreencast, and use Screencastify as a fall-back option. For audio, there's no way around Audacity. If you can shell out some dough and don't mind a bit of proprietary software, go for Lightworks, otherwise Pitivi will help you overcome most video editing problems.&lt;/p&gt;
&lt;p&gt;M&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;I work as a solution architect for Red Hat in the Benelux region&amp;#160;&lt;a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;How-to's, why this and not that, and who knows: screencasts ;)&amp;#160;&lt;a class="footnote-backref" href="#fnref:2" title="Jump back to footnote 2 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;If you know who to limit this to a single monitor, or even better: a single window, I'm all ears!&amp;#160;&lt;a class="footnote-backref" href="#fnref:3" title="Jump back to footnote 3 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="meta"/><category term="screencasts"/><category term="fedora"/><category term="meta"/></entry><entry><title>Red Hat Tech Day Demo Recordings (June 2017)</title><link href="https://100things.wzzrd.com/2017/06/14/Red-Hat-Tech-Day-Demo-Recordings-June-2017.html" rel="alternate"/><published>2017-06-14T13:31:52+01:00</published><updated>2017-06-14T13:31:52+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2017-06-14:/2017/06/14/Red-Hat-Tech-Day-Demo-Recordings-June-2017.html</id><summary type="html">&lt;p&gt;So last Tuesday, I presented about Red Hat's container development kit during the Red Hat Tech Day in Utrecht (NL). &lt;/p&gt;
&lt;p&gt;Though most of the demos succeeded eventually, they all took way longer than expected due to some network issues. I'll be frank: that sucked.&lt;/p&gt;
&lt;p&gt;I tried to make good on …&lt;/p&gt;</summary><content type="html">&lt;p&gt;So last Tuesday, I presented about Red Hat's container development kit during the Red Hat Tech Day in Utrecht (NL). &lt;/p&gt;
&lt;p&gt;Though most of the demos succeeded eventually, they all took way longer than expected due to some network issues. I'll be frank: that sucked.&lt;/p&gt;
&lt;p&gt;I tried to make good on my promise to make sure everyone would be able to see these demos at their own time and pace. This morning I did some recording, I did some editing and I did some publishing. And as of now, all five demos that I planned to do are available on my YouTube channel, and you'll find direct links to them below for convenience. There's also a &lt;a href="https://www.youtube.com/playlist?list=PLTJ5vj7osiGO7K70076Y4kjWgoQxfKyJd"&gt;playlist&lt;/a&gt; on youtube.com that has all five videos in them. For binge watching ;)&lt;/p&gt;
&lt;p&gt;Hope you enjoy and have fun trying out our awesome CDK!&lt;/p&gt;
&lt;h1&gt;Direct links to all videos&lt;/h1&gt;
&lt;h2&gt;Red Hat Tech Day NL 2017: Installing the CDK on Windows&lt;/h2&gt;
&lt;p&gt;{% youtube dpVcg5lop6M %}&lt;/p&gt;
&lt;h2&gt;Red Hat Tech Day NL 2017: Installing the CDK on Linux&lt;/h2&gt;
&lt;p&gt;{% youtube 6JLyKdGY5p4 %}&lt;/p&gt;
&lt;h2&gt;Red Hat Tech Day NL 2017: Using the CDK to do Java development on Windows&lt;/h2&gt;
&lt;p&gt;{% youtube woOoEsk9qcg %}&lt;/p&gt;
&lt;h2&gt;Red Hat Tech Day NL 2017: Using the CDK to do dotNET development on Linux&lt;/h2&gt;
&lt;p&gt;{% youtube jNgzAoYqC1k %}&lt;/p&gt;
&lt;h2&gt;Red Hat Tech Day NL 2017: Using the CDK to quickly test small changes&lt;/h2&gt;
&lt;p&gt;{% youtube sQAkzH75YfA %}&lt;/p&gt;
&lt;h1&gt;Update&lt;/h1&gt;
&lt;p&gt;Some people have asked for the json file I used to create the .NET project on the CDK I was running on Linux. I have uploaded it to this blog. You can download it &lt;a href="/assets/dotnet-important-app.json"&gt;here&lt;/a&gt;.&lt;/p&gt;</content><category term="event"/><category term="red hat"/><category term="cdk"/><category term="openshift"/><category term="containers"/><category term="development"/><category term="java"/><category term=".net"/><category term="python"/></entry><entry><title>Using virt-who with virtual datacenter subscriptions</title><link href="https://100things.wzzrd.com/2017/06/08/Using-virt-who-with-virtual-datacenter-subscriptions.html" rel="alternate"/><published>2017-06-08T13:31:52+01:00</published><updated>2017-06-08T13:31:52+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2017-06-08:/2017/06/08/Using-virt-who-with-virtual-datacenter-subscriptions.html</id><summary type="html">&lt;p&gt;At Red Hat, one of the subscription types we offer is the "virtual datacenter subscription", or VDC. A VDC offers our customers a way to run an unlimited amount of RHEL VMs on a supported hypervisor&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt;. A requirement to run an unlimited amount of VMs on a hypervisor, is …&lt;/p&gt;</summary><content type="html">&lt;p&gt;At Red Hat, one of the subscription types we offer is the "virtual datacenter subscription", or VDC. A VDC offers our customers a way to run an unlimited amount of RHEL VMs on a supported hypervisor&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt;. A requirement to run an unlimited amount of VMs on a hypervisor, is that the subscription management tool, Satellite 6 in most cases, knows which VMs run on which hypervisor. That is where the virt-who tool comes in.&lt;/p&gt;
&lt;p&gt;A bunch of people have been asking me to do a video about setting up virt-who. I guess that is because initially, setting up virt-who was kind of complicated: you needed a dedicated VM to run it on, there were some issues with configuring it correctly, etc.&lt;/p&gt;
&lt;p&gt;However: we have come a long way since then. Setting up virt-who is actually dead simple these days. We even have a &lt;a href="https://access.redhat.com/labs/virtwhoconfig/"&gt;configuration helper&lt;/a&gt; page on our customer portal. Just use the wizard on that page, and copy paste the resulting configuration file onto the system you want to run virt-who on. &lt;/p&gt;
&lt;p&gt;In the video, I do a brief explanation of what virt-who is, how to install it, and how to make it work for you. It does not explain everything, because even now, it's already a 10 minute video.&lt;/p&gt;
&lt;p&gt;In the upcoming few weeks, I'll do videos on using activation keys with VDC subs (and other subs), and on how to see whether or not you need to use virt-who with the subs you have. If you have any other topics, especially around virt-who and subscription management, you would like a video on, let me know!&lt;/p&gt;
&lt;p&gt;So go check out the video! If you enjoy let me know (and if you don't let me know what you would have liked to see differently)! Also, please subscribe if you want to get a notification the next time I publish a video, or just want to show a little support :)&lt;/p&gt;
&lt;p&gt;{% youtube y7F2zR7Yuk4 %}&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Supported virtualization platforms are RHV, vSphere, Hyper-V and libvirt on RHEL&amp;#160;&lt;a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="satellite"/><category term="virt-who"/><category term="vdc"/><category term="red-hat"/><category term="youtube"/><category term="satellite6"/></entry><entry><title>Connecting Satellite 6 and Ansible Tower</title><link href="https://100things.wzzrd.com/2017/03/30/Connecting-Satellite-6-and-Ansible-Tower.html" rel="alternate"/><published>2017-03-30T15:00:24+01:00</published><updated>2017-03-30T15:00:24+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2017-03-30:/2017/03/30/Connecting-Satellite-6-and-Ansible-Tower.html</id><summary type="html">&lt;p&gt;Today I want to talk about connecting Satellite 6 and Ansible Tower. There are two main benefits you can get right now from connecting Satellite 6 and Ansible Tower if you use both.&lt;/p&gt;
&lt;h1&gt;Sharing inventory data&lt;/h1&gt;
&lt;p&gt;First of all, if you share inventory data, you share hostnames and IP addresses …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Today I want to talk about connecting Satellite 6 and Ansible Tower. There are two main benefits you can get right now from connecting Satellite 6 and Ansible Tower if you use both.&lt;/p&gt;
&lt;h1&gt;Sharing inventory data&lt;/h1&gt;
&lt;p&gt;First of all, if you share inventory data, you share hostnames and IP addresses of systems between Satellite 6 and Ansible Tower. This is valuable by itself, because who wants to keep track of systems in two different places, right? But apart from hostnames and IP addresses, Satellite 6 will offer all other information it has on those systems to Tower as well. This means you get access to what lifecycle environment a system is in, what content view it uses, and many more things. &lt;/p&gt;
&lt;p&gt;Some of that information is available as variables at the system level, like the amount of outstanding errata and the name of the operating system. &lt;/p&gt;
&lt;p&gt;Other things are used directly in Tower to group systems by. As an example, your hostgroups in Satellite will directly transfor into groups of systems in Tower as well, and this goes for lifecycle environments, content views and Puppet environments as well. That already should make your life a lot easier :)&lt;/p&gt;
&lt;p&gt;&lt;img alt="Imported system" src="/images/imported_system.png"&gt;&lt;/p&gt;
&lt;h1&gt;Provisioning callbacks&lt;/h1&gt;
&lt;p&gt;The second things you can more easily achieve by connecting Ansible Tower to Satellite 6, is the use of &lt;em&gt;provisioning callbacks&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;A provisioning callback is a special URL on the Tower server, that can be called by a client node to invoke a playbook run on itself. In order to successfully trigger a playbook run, a client node has to POST a special variable to the URL.&lt;/p&gt;
&lt;p&gt;Tower will then refresh the inventory (you need to enable that on the inventory manually, by the way) and execute the Job Template associated with the provisioning callback.&lt;/p&gt;
&lt;h3&gt;Some code to help you get started&lt;/h3&gt;
&lt;p&gt;So what you need to do to make this work, is go to your Satellite and edit the provisioning template called "Satellite Kickstart Default". To this template, you add a little snippet near the end (preferably after the Puppet snippet, and before the 'Informing Satellite that we are built' part), that reads as follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="x"&gt;# This is RHEL7 specific code, as it uses systemctl, replace with &lt;/span&gt;
&lt;span class="x"&gt;# chkconfig or an @boot cron if you run RHEL5 or RHEL6&lt;/span&gt;

&lt;span class="cp"&gt;&amp;lt;%&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="vi"&gt;@host&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;ansible_enabled&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;true&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;&lt;span class="x"&gt;  &lt;/span&gt;
&lt;span class="x"&gt;cat &amp;gt; /etc/systemd/system/ansible-callback.service &amp;lt;&amp;lt; EOF  &lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;snippet&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;ansible_callback_service&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;&lt;span class="x"&gt;  &lt;/span&gt;
&lt;span class="x"&gt;EOF  &lt;/span&gt;

&lt;span class="x"&gt;# Runs during first boot, removes itself  &lt;/span&gt;
&lt;span class="x"&gt;/usr/bin/systemctl enable ansible-callback  &lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;%&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cp"&gt;-%&amp;gt;&lt;/span&gt;&lt;span class="x"&gt;  &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then you create a new provisioning template, call it 'ansible_callback_service', and make it a snippet. Add the following code to it. Update the hostname below to match your environment.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[Unit]&lt;/span&gt;
&lt;span class="na"&gt;Description&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;Provisioning callback to Ansible&lt;/span&gt;
&lt;span class="na"&gt;Wants&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;network-online.target&lt;/span&gt;
&lt;span class="na"&gt;After&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;network-online.target&lt;/span&gt;

&lt;span class="k"&gt;[Service]&lt;/span&gt;
&lt;span class="na"&gt;Type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;oneshot&lt;/span&gt;
&lt;span class="na"&gt;ExecStart&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/usr/bin/curl -k -s --data &amp;quot;host_config_key=&amp;lt;%= @host.params[&amp;#39;ansible_host_config_key&amp;#39;] -%&amp;gt;&amp;quot; https://tower310.deployment6.lan/api/v1/job_templates/&amp;lt;%= @host.params[&amp;#39;ansible_job_template_id&amp;#39;] -%&amp;gt;/callback/&lt;/span&gt;
&lt;span class="na"&gt;ExecStartPost&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/usr/bin/systemctl disable ansible-callback&lt;/span&gt;

&lt;span class="k"&gt;[Install]&lt;/span&gt;
&lt;span class="na"&gt;WantedBy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;multi-user.target&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;(I prefer to use a snippet for this for some more flexibility.)&lt;/p&gt;
&lt;p&gt;If you've done the above, you can assign the following variables to hosts or hostgroups:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ansible_enabled&lt;/code&gt;: must be 'true' to enable provisioning callbacks to begin with&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ansible_job_template_id&lt;/code&gt;: the ID of the job template associated with the provisioning callback URL&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ansible_host_config_key&lt;/code&gt;: the variables that needs to be POSTed to the provisioning callback URL&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Make sure the inventory associated with this job template you are configuring provisioning callbacks for has 'Update on Launch' enabled.&lt;/p&gt;
&lt;h2&gt;systemd service, or @boot cronjob, or init script&lt;/h2&gt;
&lt;p&gt;What the above will do is deploy a small systemd service on your new system. During first boot, this service will make systemd run a single cURL command and then disable the service again, so it'll only run once at the very first boot.&lt;/p&gt;
&lt;p&gt;You can also adapt this service to be a @boot cronjob, or traditional initscript as well, of course. &lt;/p&gt;
&lt;h2&gt;Update: here's the video&lt;/h2&gt;
&lt;p&gt;Duh. Forgot to include that at first :/&lt;/p&gt;
&lt;p&gt;{% youtube SXhfgJjeaGc %}&lt;/p&gt;
&lt;p&gt;Happy configuring!&lt;/p&gt;</content><category term="ansible"/><category term="ansible"/><category term="ansible-tower"/><category term="satellite6"/><category term="youtube"/></entry><entry><title>Building a highly available Ansible Tower cluster</title><link href="https://100things.wzzrd.com/2017/03/13/Building-a-highly-available-Ansible-Tower-cluster.html" rel="alternate"/><published>2017-03-13T15:03:38+01:00</published><updated>2017-03-13T15:03:38+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2017-03-13:/2017/03/13/Building-a-highly-available-Ansible-Tower-cluster.html</id><summary type="html">&lt;p&gt;With the release of Ansible Tower 3.1 a short while back, it became possible to setup Ansible Tower in a highly available, active-active topology. You do this by setting up multiple Tower nodes that talk to a shared PostgreSQL database on a separate node. This database can be setup …&lt;/p&gt;</summary><content type="html">&lt;p&gt;With the release of Ansible Tower 3.1 a short while back, it became possible to setup Ansible Tower in a highly available, active-active topology. You do this by setting up multiple Tower nodes that talk to a shared PostgreSQL database on a separate node. This database can be setup and managed by the Tower installation playbook, or you can manage it yourself.&lt;/p&gt;
&lt;p&gt;Each of the Tower nodes will serve up the web front end, so your users can choose which Tower server they use to log into. If you change the configuration through the web UI on one node, the change is visible over all instances through the shared database. For example, uploading a Tower license file to one of the Tower instances will make it show up in all of your Tower cluster nodes.&lt;/p&gt;
&lt;p&gt;Cluster nodes keep in touch with one another for job scheduling and such through RabbitMQ.&lt;/p&gt;
&lt;p&gt;Sounds good? That's because it is! And it gets better: setting up a Tower cluster is insanely easy!&lt;/p&gt;
&lt;p&gt;As an example, I have set up a Tower cluster on three nodes: tower01.nontoonyt.lan, tower02.nontoonyt.lan and tower03.nontoonyt.lan. The database will reside on towerdb.nontoonyt.lan. By configuring the inventory in a specific - and quite simple - way, the Tower installation playbooks will build the whole cluster for me. &lt;/p&gt;
&lt;p&gt;&lt;img alt="Tower Cluster Topology" src="/images/ansible-tower-cluster.png"&gt;&lt;/p&gt;
&lt;p&gt;The below snippet is an edited version of the special inventory file we ship in the ansible-tower-setup tarball, called "inventory_cluster". &lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[tower]&lt;/span&gt;
&lt;span class="na"&gt;tower01.nontoonyt.lan&lt;/span&gt;
&lt;span class="na"&gt;tower02.nontoonyt.lan&lt;/span&gt;
&lt;span class="na"&gt;tower03.nontoonyt.lan&lt;/span&gt;

&lt;span class="k"&gt;[database]&lt;/span&gt;
&lt;span class="na"&gt;towerdb.nontoonyt.lan&lt;/span&gt;

&lt;span class="k"&gt;[all:vars]&lt;/span&gt;
&lt;span class="na"&gt;admin_password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;myPassw0rd&amp;#39;&lt;/span&gt;

&lt;span class="na"&gt;pg_host&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;towerdb.nontoonyt.lan&amp;#39;&lt;/span&gt;
&lt;span class="na"&gt;pg_port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;5432&amp;#39;&lt;/span&gt;

&lt;span class="na"&gt;pg_database&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;tower&amp;#39;&lt;/span&gt;
&lt;span class="na"&gt;pg_username&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;tower&amp;#39;&lt;/span&gt;
&lt;span class="na"&gt;pg_password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;myPassw0rd&amp;#39;&lt;/span&gt;

&lt;span class="na"&gt;rabbitmq_port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;5672&lt;/span&gt;
&lt;span class="na"&gt;rabbitmq_vhost&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;tower&lt;/span&gt;
&lt;span class="na"&gt;rabbitmq_username&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;tower&lt;/span&gt;
&lt;span class="na"&gt;rabbitmq_password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;myPassw0rd&amp;#39;&lt;/span&gt;
&lt;span class="na"&gt;rabbitmq_cookie&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;omnomnomnom&lt;/span&gt;

&lt;span class="c1"&gt;# Needs to be true for fqdns and ip addresses&lt;/span&gt;
&lt;span class="na"&gt;rabbitmq_use_long_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;To invoke setup.sh to perform a cluster installation based on that inventory file, you just run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;# ./setup.sh -i inventory_cluster&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;That's it. Hope you enjoy the new Ansible Tower cluster feature! Take a look at the Youtube screencast that goes with this blog.&lt;/p&gt;
&lt;p&gt;{% youtube t3VdUjjuv70 %}&lt;/p&gt;</content><category term="ansible"/><category term="ansible"/><category term="ansible tower"/><category term="youtube"/></entry><entry><title>Using a dedicated Puppet content view</title><link href="https://100things.wzzrd.com/2017/01/31/How-to-use-a-dedicated-Puppet-content-view-in-Satellite-6.html" rel="alternate"/><published>2017-01-31T13:24:18+01:00</published><updated>2017-01-31T13:24:18+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2017-01-31:/2017/01/31/How-to-use-a-dedicated-Puppet-content-view-in-Satellite-6.html</id><summary type="html">&lt;p&gt;After I &lt;a href="https://www.youtube.com/watch?v=04m6SlvzvKY&amp;amp;list=PLTJ5vj7osiGMHEi9SQvoyXD2vNL_v8WFv"&gt;presented at Summit&lt;/a&gt; last Summer, I starting getting frequent questions around how to setup a dedicated Puppet content view in Satellite 6.&lt;/p&gt;
&lt;p&gt;Using a dedicated Puppet content view can be useful for your organization if you are doing intensive development on your Puppet code base. This usually applies …&lt;/p&gt;</summary><content type="html">&lt;p&gt;After I &lt;a href="https://www.youtube.com/watch?v=04m6SlvzvKY&amp;amp;list=PLTJ5vj7osiGMHEi9SQvoyXD2vNL_v8WFv"&gt;presented at Summit&lt;/a&gt; last Summer, I starting getting frequent questions around how to setup a dedicated Puppet content view in Satellite 6.&lt;/p&gt;
&lt;p&gt;Using a dedicated Puppet content view can be useful for your organization if you are doing intensive development on your Puppet code base. This usually applies to organizations that are just getting started implementing Puppet: you are making many changes to the Puppet code base all the time, and if you stick those modules in a CV with 35,000 RPMs in there as well, publishing a new version will take more time than  you probably want to spend waiting. (Apologies for the long sentence there.)&lt;/p&gt;
&lt;p&gt;&lt;img alt="a Puppet CV" src="/images/pupcvs.png"&gt;&lt;/p&gt;
&lt;p&gt;If you split out your Puppet modules into a dedicated content view, you get quick publishing and promotion of that content view, speeding up the pace of making changes to your Puppet code base.&lt;/p&gt;
&lt;p&gt;The downside is, that you are breaking the bond between RPMs and Puppet content views. This means that you can no longer be sure that a specific version of a content view with RPMs is tested with a certain set of Puppet modules. How important that is for your infrastructure, I cannot assess, but I have learned it varies from customer to customer.&lt;/p&gt;
&lt;p&gt;Anyway, I created another screencast to explain the concept of a dedicated Puppet content view, uploaded it to Youtube and I hope you enjoy. &lt;/p&gt;
&lt;p&gt;Please make sure you subscribe to the channel and leave comments and / or like the video. Your feedback is important to me and makes it clear whether or not I'm helping people by making these videos.&lt;/p&gt;
&lt;p&gt;Next time around, I'll start introducing other Red Hat management products, starting with Ansible Tower.&lt;/p&gt;
&lt;p&gt;Until then! Cheers!&lt;/p&gt;
&lt;p&gt;{% youtube Y6xDU-WMFFY %}&lt;/p&gt;</content><category term="satellite"/><category term="youtube"/><category term="satellite6"/><category term="content-views"/><category term="puppet"/></entry><entry><title>Content views and composite content views</title><link href="https://100things.wzzrd.com/2017/01/31/Content-views-and-composite-content-views.html" rel="alternate"/><published>2017-01-31T10:51:11+01:00</published><updated>2017-01-31T10:51:11+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2017-01-31:/2017/01/31/Content-views-and-composite-content-views.html</id><summary type="html">&lt;p&gt;&lt;img alt="Whiteboarding" src="/images/boxes.png"&gt;&lt;/p&gt;
&lt;p&gt;We have been talking about content views in the previous posts, but to be sure we are all on the same page: a content view is a versioned, filtered set of repositories that you can promote between lifecycle environments. We have been talking about 'normal' content views, or CV, up …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="Whiteboarding" src="/images/boxes.png"&gt;&lt;/p&gt;
&lt;p&gt;We have been talking about content views in the previous posts, but to be sure we are all on the same page: a content view is a versioned, filtered set of repositories that you can promote between lifecycle environments. We have been talking about 'normal' content views, or CV, up until now, but Satellite 6 also knows the concept of a &lt;em&gt;composite content view&lt;/em&gt;, or CCV.&lt;/p&gt;
&lt;p&gt;A composite content view allows you to bundle other content views, rather than individual repositories. The best approach to this is to start creating re-usable building blocks (component content views) to bundle in CCVs. You could, for example, create a building block for the base operating system, and combine that with different application content views into composite content views. &lt;/p&gt;
&lt;p&gt;You might want to do this if your application content views follow different lifecycle paths, or move slower (or faster) than your base operating system content view through the same lifecycle path.&lt;/p&gt;
&lt;p&gt;Another use case would be if the application content view is maintained by a different department. By using composite content views in that case, the team of application administrators or developers can manage the application content view, and the Linux administrator team can manage the base operating system content view. Every once in a while - depending on requirements - the two component CVs are bundled together into a CCV, and then published and promoted.&lt;/p&gt;
&lt;p&gt;You then use activation keys to register new systems to the CCV and use the provisions in that activation key to grant access to specific repositories in the CCV. (This will be the topic of a later video.)&lt;/p&gt;
&lt;p&gt;I created this episode because people often ask what the difference is between CVs and CCVs, and if they should always use CCVs. I want to be clear about that last question. The answer to it is a distinct &lt;em&gt;no&lt;/em&gt;. Do &lt;em&gt;not&lt;/em&gt; use CCVs just because you can. &lt;em&gt;Do&lt;/em&gt; use CCVs because you are trying to solve one of the use cases mentioned above, or one of the use cases mentioned in the &lt;a href="https://access.redhat.com/articles/1585273"&gt;10 Steps to Build an SOE with Satellite 6&lt;/a&gt; document. For those cases, CCVs are perfect :)&lt;/p&gt;
&lt;p&gt;Hope you enjoy the video! Please subscribe and leave any comments here, or on YouTube, whichever you prefer!&lt;/p&gt;
&lt;p&gt;Until next time!&lt;/p&gt;
&lt;p&gt;{% youtube BJjAWME1TlQ %}&lt;/p&gt;</content><category term="satellite"/><category term="satellite6"/><category term="content-views"/><category term="youtube"/></entry><entry><title>New video: Updating your Satellite 6 system</title><link href="https://100things.wzzrd.com/2017/01/31/New-video-Updating-your-Satellite-6-system.html" rel="alternate"/><published>2017-01-31T10:51:11+01:00</published><updated>2017-01-31T10:51:11+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2017-01-31:/2017/01/31/New-video-Updating-your-Satellite-6-system.html</id><summary type="html">&lt;p&gt;The other day, I was talking to a customer about Satellite updates regarding the recently released &lt;a href="https://access.redhat.com/blogs/1169563/posts/2890071"&gt;Satellite 6.2.7 update&lt;/a&gt;. He and his co-workers were a little anxious about updating their Satellite server, as it is a quite vital piece of their infrastructure.&lt;/p&gt;
&lt;p&gt;I explained the simple upgrade procedure …&lt;/p&gt;</summary><content type="html">&lt;p&gt;The other day, I was talking to a customer about Satellite updates regarding the recently released &lt;a href="https://access.redhat.com/blogs/1169563/posts/2890071"&gt;Satellite 6.2.7 update&lt;/a&gt;. He and his co-workers were a little anxious about updating their Satellite server, as it is a quite vital piece of their infrastructure.&lt;/p&gt;
&lt;p&gt;I explained the simple upgrade procedure and as they ran through it, they quickly saw that everything went smoothly. Within a couple of minutes they were running on a new versin of Satellite! :)&lt;/p&gt;
&lt;p&gt;It then occured to me though, that it would make sense to pause the video series about content views for a bit. Instead of a content view video, I'm doing an extra video on the simple steps of safely and correctly updating a Satellite server.&lt;/p&gt;
&lt;p&gt;This is a really short one - as I hope to have more - that walks you quickly through the steps of updating a Satellite 6 system:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;identifying that there is an update outstanding (always read the documentation about released updates!)&lt;/li&gt;
&lt;li&gt;installing the updated packages&lt;/li&gt;
&lt;li&gt;making sure any database migrations and mandatory configuration file changes are applied&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The video below will take you through these steps and make sure you are prepared for your next Satellite 6 update! :) Please subscribe to the Youtube channel to be informed of future videos!&lt;/p&gt;
&lt;p&gt;{% youtube 9U2PMJvXPQU %}&lt;/p&gt;</content><category term="satellite"/><category term="youtube"/><category term="satellite6"/><category term="updates"/></entry><entry><title>Advanced content filtering with Satellite 6</title><link href="https://100things.wzzrd.com/2017/01/30/Advanced-content-filtering-with-Satellite-6.html" rel="alternate"/><published>2017-01-30T09:48:30+01:00</published><updated>2017-01-30T09:48:30+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2017-01-30:/2017/01/30/Advanced-content-filtering-with-Satellite-6.html</id><summary type="html">&lt;p&gt;Today's video is about advanced content filtering in Satellite 6. As you probably know, Satellite 6 allows you to filter any repositories it serves out to your clients. These filtered repositories we call 'content views'. If you are unfamiliar with that, I suggest you go take a look at &lt;a href="https://www.youtube.com/watch?v=pQp4LqBpaKg"&gt;last …&lt;/a&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;Today's video is about advanced content filtering in Satellite 6. As you probably know, Satellite 6 allows you to filter any repositories it serves out to your clients. These filtered repositories we call 'content views'. If you are unfamiliar with that, I suggest you go take a look at &lt;a href="https://www.youtube.com/watch?v=pQp4LqBpaKg"&gt;last week's video&lt;/a&gt;, that introduces content views and some related concepts.&lt;/p&gt;
&lt;p&gt;If you are ready for a deeper dive into content filtering, then this week's video is exactly right for you! As a short preview, this week, I'm talking about:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the difference between include and exclude filters,&lt;/li&gt;
&lt;li&gt;in what cases it makes sense to combine include and exclude filters,&lt;/li&gt;
&lt;li&gt;in what cases it does not,&lt;/li&gt;
&lt;li&gt;filtering errata vs. filtering packages&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ready? Jump in (and subscribe!) by &lt;a href="https://www.youtube.com/watch?v=p-t4WNctFyI"&gt;clicking right here&lt;/a&gt;, or watch inline below:&lt;/p&gt;
&lt;p&gt;{% youtube p-t4WNctFyI %}&lt;/p&gt;</content><category term="satellite"/><category term="youtube"/><category term="satellite6"/><category term="content-views"/></entry><entry><title>Introducing a new blog!</title><link href="https://100things.wzzrd.com/2017/01/30/Introducing-a-new-blog.html" rel="alternate"/><published>2017-01-30T09:05:19+01:00</published><updated>2017-01-30T09:05:19+01:00</updated><author><name>Maxim Burgerhout</name></author><id>tag:100things.wzzrd.com,2017-01-30:/2017/01/30/Introducing-a-new-blog.html</id><summary type="html">&lt;p&gt;With my recently launched Youtube channel - 100 things to do with Red Hat Management products - I felt that it would be useful to have a blog. A place where I could announce new videos, add some additional explanation to those videos, link to extra content, etc. &lt;/p&gt;
&lt;p&gt;To be honest, I'm …&lt;/p&gt;</summary><content type="html">&lt;p&gt;With my recently launched Youtube channel - 100 things to do with Red Hat Management products - I felt that it would be useful to have a blog. A place where I could announce new videos, add some additional explanation to those videos, link to extra content, etc. &lt;/p&gt;
&lt;p&gt;To be honest, I'm not completely sure that I've found what I'm looking for with this Hubpress.io thingy, but it looks good enough for now.&lt;/p&gt;
&lt;p&gt;Update 2020-01-19: Hubpress seems to have died in the meantime. Sigh. I sometime have a bad hand at picking open source projects to build my things on :/ &lt;/p&gt;
&lt;p&gt;I'm switching to Jekyll. Seems to be healthy enough. Hope I'm not rewriting this again in a year or two.&lt;/p&gt;</content><category term="meta"/><category term="intro"/></entry></feed>