<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Automation on Ubuntu Tips</title><link>https://ubuntips.com/tags/automation/</link><description>Recent content in Automation on Ubuntu Tips</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sat, 21 Nov 2026 15:36:19 +0800</lastBuildDate><atom:link href="https://ubuntips.com/tags/automation/index.xml" rel="self" type="application/rss+xml"/><item><title>One idempotent script for the whole Ubuntu web stack</title><link>https://ubuntips.com/posts/one-idempotent-script/</link><pubDate>Wed, 18 Nov 2026 10:15:00 +0800</pubDate><guid>https://ubuntips.com/posts/one-idempotent-script/</guid><description>&lt;p&gt;The setup script behind most of these notes has one rule: every run must be safe to repeat. That constraint shapes the whole design, and it is the part most provisioning scripts get wrong.&lt;/p&gt;&#10;&lt;p&gt;This post is the long version of the script&amp;rsquo;s README: what it installs, what each flag does, what it refuses to touch, and how to verify a host afterwards. The source is at &lt;a href="https://github.com/droplinxuser/ubuntu-setup-script"&gt;droplinxuser/ubuntu-setup-script&lt;/a&gt;.&lt;/p&gt;&#10;&lt;h2 id="why-idempotence-is-the-hard-part" class="heading-anchor"&gt;Why idempotence is the hard part&lt;a class="anchor" href="#why-idempotence-is-the-hard-part" aria-label="Link to section: Why idempotence is the hard part"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;A script that only has to work once can do almost anything: append to a file, create a user, restart a service, assume the default config is still there. The second run is where the trouble starts. Appending twice duplicates a directive. Creating a user that already exists may reset its groups. Restarting a service in the middle of a config write can leave it running on half a file.&lt;/p&gt;</description></item></channel></rss>