<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Ansible &amp; Automation on Panic! At The Terminal</title>
		<link>https://blog.nousiainen.xyz/docs/automation/</link>
		<description>Recent content in Ansible &amp; Automation on Panic! At The Terminal</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<atom:link href="https://blog.nousiainen.xyz/docs/automation/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Automatically Deploy a Hugo Site with GitLab CI/CD</title>
				<link>https://blog.nousiainen.xyz/docs/automation/gitlab-ci-hugo-deployment/</link>
				<pubDate>Sat, 24 Oct 2026 20:50:54 +0300</pubDate>
				<guid>https://blog.nousiainen.xyz/docs/automation/gitlab-ci-hugo-deployment/</guid>
				<description>&lt;h1 id=&#34;automatically-deploy-a-hugo-site-with-gitlab-cicd&#34;&gt;&#xA;  Automatically Deploy a Hugo Site with GitLab CI/CD&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#automatically-deploy-a-hugo-site-with-gitlab-cicd&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;I wanted publishing a change to this site to be more than a reminder to log in to the server and run Hugo by hand. My GitLab pipeline connects to my Hugo server and builds the site there when I push to &lt;code&gt;master&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This setup uses a self-hosted GitLab Runner that can reach the Hugo server on my home network. The pipeline does not upload a build artifact: the server has its own checkout of the blog repository, and the deploy job pulls the latest changes before running Hugo.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Docker Instance Upgrades with Ansible</title>
				<link>https://blog.nousiainen.xyz/docs/automation/docker-upgrades/</link>
				<pubDate>Wed, 16 Jul 2025 18:23:20 +0200</pubDate>
				<guid>https://blog.nousiainen.xyz/docs/automation/docker-upgrades/</guid>
				<description>&lt;h1 id=&#34;docker-instance-upgrades-with-ansible&#34;&gt;&#xA;  Docker Instance Upgrades with Ansible&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#docker-instance-upgrades-with-ansible&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;This guide shows how to automate Docker container upgrades using Ansible playbooks instead of manual updates. By automating this process, you ensure consistency, reduce errors, and save time when updating multiple Docker instances across your infrastructure.&lt;/p&gt;&#xA;&lt;h2 id=&#34;infrastructure-overview&#34;&gt;&#xA;  Infrastructure Overview&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#infrastructure-overview&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;My homelab includes these Docker-based services:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Nginx Proxy Manager&lt;/strong&gt; (proxy.home.arpa) - Reverse proxy with SSL&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Healthchecks&lt;/strong&gt; (health.home.arpa) - Monitoring service&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Home Assistant&lt;/strong&gt; (hass.home.arpa) - Home automation platform&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Bitwarden&lt;/strong&gt; (bit.home.arpa) - Password manager&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;ansible-playbook-structure&#34;&gt;&#xA;  Ansible Playbook Structure&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#ansible-playbook-structure&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;host-configuration&#34;&gt;&#xA;  Host Configuration&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#host-configuration&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;The playbook targets specific hosts with Docker services:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Infrastructure as Code with Ansible Automation Platform</title>
				<link>https://blog.nousiainen.xyz/docs/automation/ansible-automation-platform-iac-setup/</link>
				<pubDate>Sun, 13 Jul 2025 15:00:00 +0300</pubDate>
				<guid>https://blog.nousiainen.xyz/docs/automation/ansible-automation-platform-iac-setup/</guid>
				<description>&lt;h1 id=&#34;infrastructure-as-code-for-ansible-automation-platform-setup&#34;&gt;&#xA;  Infrastructure as Code for Ansible Automation Platform Setup&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#infrastructure-as-code-for-ansible-automation-platform-setup&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;introduction&#34;&gt;&#xA;  Introduction&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#introduction&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Setting up Ansible Automation Platform (AAP) manually through the web interface is tedious and highly prone to errors.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ve written an Ansible playbook that completely automates the setup of my AAP environment, from credentials and projects to job templates and workflow orchestration. So in case I ever need to rebuild the environment from scratch, all I would need to do is just add the project where that playbook is stored, and add a single template by hand and run it. I&amp;rsquo;d do it that way because I don&amp;rsquo;t like running ansible playbooks from the CLI, I always, always use AAP!&lt;/p&gt;</description>
			</item>
			<item>
				<title>Automating RHEL Server Updates with Ansible</title>
				<link>https://blog.nousiainen.xyz/docs/automation/rhel-server-updates-ansible/</link>
				<pubDate>Sat, 05 Jul 2025 16:00:00 +0300</pubDate>
				<guid>https://blog.nousiainen.xyz/docs/automation/rhel-server-updates-ansible/</guid>
				<description>&lt;h1 id=&#34;automating-rhel-server-updates-with-ansible&#34;&gt;&#xA;  Automating RHEL Server Updates with Ansible&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#automating-rhel-server-updates-with-ansible&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;introduction&#34;&gt;&#xA;  Introduction&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#introduction&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;I hate updating my servers manually so I&amp;rsquo;ve set up this playbook to run updates. This was probably the first playbook I ever wrote for my home lab, and it&amp;rsquo;s been running automatically for years now on a weekly schedule every Friday night through AAP (Ansible Automation Platform).&lt;/p&gt;&#xA;&lt;p&gt;This guide shows you how to automate RHEL (and other yum/dnf based distros like Fedora, CentOS etc.) server updates using Ansible, including proper reboot handling.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Setting Up Pre-commit Hooks</title>
				<link>https://blog.nousiainen.xyz/docs/automation/precommit-hooks/</link>
				<pubDate>Thu, 03 Jul 2025 12:00:00 +0300</pubDate>
				<guid>https://blog.nousiainen.xyz/docs/automation/precommit-hooks/</guid>
				<description>&lt;h1 id=&#34;setting-up-pre-commit-hooks&#34;&gt;&#xA;  Setting Up Pre-commit hooks&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#setting-up-pre-commit-hooks&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;what-are-they&#34;&gt;&#xA;  What are they?&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#what-are-they&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Pre-commit hooks are automated scripts that run before each commit, helping you catch issues early and maintain consistent code quality.&lt;/p&gt;&#xA;&lt;h2 id=&#34;steps&#34;&gt;&#xA;  Steps&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#steps&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Installing and configuring pre-commit&lt;/li&gt;&#xA;&lt;li&gt;Setting up hooks for markdown files&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;installation&#34;&gt;&#xA;  Installation&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#installation&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;First, install pre-commit using pip:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pip install pre-commit&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;configuration&#34;&gt;&#xA;  Configuration&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#configuration&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Create a &lt;code&gt;.pre-commit-config.yaml&lt;/code&gt; file in your repository root:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;repos&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  - &lt;span style=&#34;color:#f92672&#34;&gt;repo&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;https://github.com/pre-commit/pre-commit-hooks&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;rev&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;v4.4.0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;hooks&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      - &lt;span style=&#34;color:#f92672&#34;&gt;id&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;trailing-whitespace&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      - &lt;span style=&#34;color:#f92672&#34;&gt;id&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;end-of-file-fixer&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      - &lt;span style=&#34;color:#f92672&#34;&gt;id&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;check-yaml&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      - &lt;span style=&#34;color:#f92672&#34;&gt;id&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;check-added-large-files&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      - &lt;span style=&#34;color:#f92672&#34;&gt;id&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;check-case-conflict&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      - &lt;span style=&#34;color:#f92672&#34;&gt;id&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;check-merge-conflict&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;what-each-hook-does&#34;&gt;&#xA;  What Each Hook Does&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#what-each-hook-does&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;basic-hooks&#34;&gt;&#xA;  Basic Hooks&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#basic-hooks&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;trailing-whitespace&lt;/strong&gt;: Removes trailing whitespace from lines&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;end-of-file-fixer&lt;/strong&gt;: Ensures files end with a newline&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;check-yaml&lt;/strong&gt;: Validates YAML syntax&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;check-added-large-files&lt;/strong&gt;: Prevents accidentally committing large files&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;check-case-conflict&lt;/strong&gt;: Catches case conflicts that would cause issues on case-insensitive filesystems&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;check-merge-conflict&lt;/strong&gt;: Detects merge conflict markers&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;For a complete list of all available hooks, check out the &lt;a href=&#34;https://github.com/pre-commit/pre-commit-hooks&#34;&gt;pre-commit-hooks repository&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>How to setup Ansible Vault</title>
				<link>https://blog.nousiainen.xyz/docs/automation/ansible-vault-guide/</link>
				<pubDate>Thu, 03 Jul 2025 10:00:00 +0300</pubDate>
				<guid>https://blog.nousiainen.xyz/docs/automation/ansible-vault-guide/</guid>
				<description>&lt;h1 id=&#34;how-to-setup-ansible-vault&#34;&gt;&#xA;  How to setup Ansible Vault&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#how-to-setup-ansible-vault&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s a little guide on how I setup Ansible Vault for my Ansible playbook repository. It&amp;rsquo;s surprisingly simple and now all of my secrets are encrypted.&lt;/p&gt;&#xA;&lt;h2 id=&#34;setting-up-ansible-vault&#34;&gt;&#xA;  Setting Up Ansible Vault&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#setting-up-ansible-vault&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;1-create-the-directory-structure&#34;&gt;&#xA;  1. Create the Directory Structure&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#1-create-the-directory-structure&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;First, create the standard Ansible directory structure for group variables:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkdir -p group_vars/all&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;2-create-your-vault-file&#34;&gt;&#xA;  2. Create Your Vault File&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#2-create-your-vault-file&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;Create a vault file to store your encrypted credentials:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Use ansible-lint with Vault Files</title>
				<link>https://blog.nousiainen.xyz/docs/automation/ansible-lint-vault/</link>
				<pubDate>Mon, 30 Jun 2025 18:46:13 +0300</pubDate>
				<guid>https://blog.nousiainen.xyz/docs/automation/ansible-lint-vault/</guid>
				<description>&lt;h1 id=&#34;use-ansible-lint-with-vault-files&#34;&gt;&#xA;  Use ansible-lint with Vault Files&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#use-ansible-lint-with-vault-files&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;why-i-wrote-this-post&#34;&gt;&#xA;  Why I wrote this post&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#why-i-wrote-this-post&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;I decided to write this post because I struggled to find clear, practical examples of how to make &lt;code&gt;ansible-lint&lt;/code&gt; work with Ansible Vault files in CI/CD environments. While searching for solutions, I found &lt;a href=&#34;https://github.com/ansible/ansible-lint/discussions/3899&#34;&gt;a GitHub discussion&lt;/a&gt; where someone was asking the exact same question I had.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;https://ansible.readthedocs.io/projects/lint/usage/#vaults&#34;&gt;official ansible-lint documentation&lt;/a&gt; mentions that decrypting Ansible Vault in CI is possible, but frustratingly, it doesn&amp;rsquo;t provide any actual examples of how to implement it. After some trial and error, I figured out a working solution that I want to share.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
