summaryrefslogtreecommitdiff
path: root/gemfeed/2026-03-02-rcm-ruby-configuration-management-dsl.html
diff options
context:
space:
mode:
Diffstat (limited to 'gemfeed/2026-03-02-rcm-ruby-configuration-management-dsl.html')
-rw-r--r--gemfeed/2026-03-02-rcm-ruby-configuration-management-dsl.html417
1 files changed, 417 insertions, 0 deletions
diff --git a/gemfeed/2026-03-02-rcm-ruby-configuration-management-dsl.html b/gemfeed/2026-03-02-rcm-ruby-configuration-management-dsl.html
new file mode 100644
index 00000000..bbef80b0
--- /dev/null
+++ b/gemfeed/2026-03-02-rcm-ruby-configuration-management-dsl.html
@@ -0,0 +1,417 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>RCM: The Ruby Configuration Management DSL</title>
+<link rel="shortcut icon" type="image/gif" href="/favicon.ico" />
+<link rel="stylesheet" href="../style.css" />
+<link rel="stylesheet" href="style-override.css" />
+</head>
+<body>
+<p class="header">
+<a href="https://foo.zone">Home</a> | <a href="https://codeberg.org/snonux/foo.zone/src/branch/content-md/gemfeed/2026-03-02-rcm-ruby-configuration-management-dsl.md">Markdown</a> | <a href="gemini://foo.zone/gemfeed/2026-03-02-rcm-ruby-configuration-management-dsl.gmi">Gemini</a>
+</p>
+<h1 style='display: inline' id='rcm-the-ruby-configuration-management-dsl'>RCM: The Ruby Configuration Management DSL</h1><br />
+<br />
+<span class='quote'>Published at 2026-03-02T00:00:00+02:00</span><br />
+<br />
+<span>RCM is a tiny configuration management system written in Ruby. It gives me a small DSL for describing how I want my machines to look, then it applies the changes: create files and directories, manage packages, and make sure certain lines exist in configuration files. It&#39;s deliberately KISS and optimised for a single person&#39;s machines instead of a whole fleet.</span><br />
+<br />
+<a href='./rcm-ruby-configuration-management-dsl/rcm-dsl.png'><img alt='RCM DSL in action' title='RCM DSL in action' src='./rcm-ruby-configuration-management-dsl/rcm-dsl.png' /></a><br />
+<br />
+<h2 style='display: inline' id='table-of-contents'>Table of Contents</h2><br />
+<br />
+<ul>
+<li><a href='#rcm-the-ruby-configuration-management-dsl'>RCM: The Ruby Configuration Management DSL</a></li>
+<li>⇢ <a href='#why-i-built-rcm'>Why I built RCM</a></li>
+<li>⇢ <a href='#how-the-dsl-feels'>How the DSL feels</a></li>
+<li>⇢ ⇢ <a href='#keywords-and-resources'>Keywords and resources</a></li>
+<li>⇢ ⇢ <a href='#files-directories-and-templates'>Files, directories, and templates</a></li>
+<li>⇢ <a href='#how-ruby-s-metaprogramming-helps'>How Ruby&#39;s metaprogramming helps</a></li>
+<li>⇢ ⇢ <a href='#a-bit-more-about-methodmissing'>A bit more about <span class='inlinecode'>method_missing</span></a></li>
+<li>⇢ <a href='#ruby-metaprogramming-further-reading'>Ruby metaprogramming: further reading</a></li>
+<li>⇢ <a href='#safety-dry-runs-and-debugging'>Safety, dry runs, and debugging</a></li>
+<li>⇢ <a href='#rcm-vs-puppet-and-other-big-tools'>RCM vs Puppet and other big tools</a></li>
+<li>⇢ <a href='#cutting-rcm-010'>Cutting RCM 0.1.0</a></li>
+<li>⇢ <a href='#what-s-next'>What&#39;s next</a></li>
+<li>⇢ <a href='#feature-overview-selected'>Feature overview (selected)</a></li>
+</ul><br />
+<h2 style='display: inline' id='why-i-built-rcm'>Why I built RCM</h2><br />
+<br />
+<span>I&#39;ve used (and still use) the usual suspects in configuration management: Puppet, Chef, Ansible, etc. They are powerful, but also come with orchestration layers, agents, inventories, and a lot of moving parts. For my personal machines I wanted something smaller: one Ruby process, one configuration file, a few resource types, and good enough safety features.</span><br />
+<br />
+<span>I&#39;ve always been a fan of Ruby&#39;s metaprogramming features, and this project let me explore them in a focused, practical way.</span><br />
+<br />
+<span>Because of that metaprogramming support, Ruby is a great fit for DSLs. You can get very close to natural language without inventing a brand-new syntax. RCM leans into that: the goal is to read a configuration and understand what happens without jumping between multiple files or templating languages.</span><br />
+<br />
+<a class='textlink' href='https://codeberg.org/snonux/rcm'>RCM repo on Codeberg</a><br />
+<br />
+<h2 style='display: inline' id='how-the-dsl-feels'>How the DSL feels</h2><br />
+<br />
+<span>An RCM configuration starts with a <span class='inlinecode'>configure</span> block. Inside it you declare resources (<span class='inlinecode'>file</span>, <span class='inlinecode'>package</span>, <span class='inlinecode'>given</span>, <span class='inlinecode'>notify</span>, …). RCM figures out dependencies between resources and runs them in the right order.</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>configure <b><u><font color="#000000">do</font></u></b>
+ given { hostname is :earth }
+
+ file <font color="#808080">'/tmp/test/wg0.conf'</font> <b><u><font color="#000000">do</font></u></b>
+ requires <font color="#808080">'/etc/hosts.test'</font>
+ manage directory
+ from template
+ <font color="#808080">'content with &lt;%= 1 + 2 %&gt;'</font>
+ <b><u><font color="#000000">end</font></u></b>
+
+ file <font color="#808080">'/etc/hosts.test'</font> <b><u><font color="#000000">do</font></u></b>
+ line <font color="#808080">'192.168.1.101 earth'</font>
+ <b><u><font color="#000000">end</font></u></b>
+<b><u><font color="#000000">end</font></u></b>
+</pre>
+<br />
+<span>The idea is that you describe the desired state and RCM worries about the steps. The <span class='inlinecode'>given</span> block can short‑circuit the whole run (for example, only run on a specific hostname). Each <span class='inlinecode'>file</span> resource can either manage a complete file (from a template) or just make sure individual lines are present.</span><br />
+<br />
+<h3 style='display: inline' id='keywords-and-resources'>Keywords and resources</h3><br />
+<br />
+<span>Under the hood, each DSL word is either a keyword or a resource:</span><br />
+<br />
+<ul>
+<li><span class='inlinecode'>Keyword</span> is the base class for all top‑level DSL constructs.</li>
+<li><span class='inlinecode'>Resource</span> is the base class for things RCM can manage (files, packages, and so on).</li>
+</ul><br />
+<span>Resources can declare dependencies with <span class='inlinecode'>requires</span>. Before a resource runs, RCM makes sure all its requirements are satisfied and only evaluates each resource once per run. This keeps the mental model simple even when you compose more complex configurations.</span><br />
+<br />
+<h3 style='display: inline' id='files-directories-and-templates'>Files, directories, and templates</h3><br />
+<br />
+<span>The <span class='inlinecode'>file</span> resource handles three common cases:</span><br />
+<br />
+<ul>
+<li>Managing parent directories (<span class='inlinecode'>manage directory</span>) so you don&#39;t have to create them manually.</li>
+<li>Rendering ERB templates (<span class='inlinecode'>from template</span>) so you can mix Ruby expressions into config files.</li>
+<li>Ensuring individual lines exist (<span class='inlinecode'>line</span>) for the many "append this line if missing" situations.</li>
+</ul><br />
+<span>Every write operation creates a backup copy in <span class='inlinecode'>.rcmbackup/</span>, so you can always inspect what changed and roll back manually if needed.</span><br />
+<br />
+<h2 style='display: inline' id='how-ruby-s-metaprogramming-helps'>How Ruby&#39;s metaprogramming helps</h2><br />
+<br />
+<span>The nice thing about RCM is that the Ruby code you write in your configuration is not that different from the Ruby code inside RCM itself. The DSL is just a thin layer on top.</span><br />
+<br />
+<span>For example, when you write:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>file <font color="#808080">'/etc/hosts.test'</font> <b><u><font color="#000000">do</font></u></b>
+ line <font color="#808080">'192.168.1.101 earth'</font>
+<b><u><font color="#000000">end</font></u></b>
+</pre>
+<br />
+<span>Ruby turns <span class='inlinecode'>file</span> into a method call and <span class='inlinecode'>&#39;/etc/hosts.test&#39;</span> into a normal argument. Inside RCM, that method builds a <span class='inlinecode'>File</span> resource object and stores it for later. The block you pass is just a Ruby block; RCM calls it with the file resource as <span class='inlinecode'>self</span>, so method calls like <span class='inlinecode'>line</span> configure that resource. There is no special parser here, just plain Ruby method and block dispatch.</span><br />
+<br />
+<span>The same goes for constructs like:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>given { hostname is :earth }
+</pre>
+<br />
+<span>RCM uses Ruby&#39;s dynamic method lookup to interpret <span class='inlinecode'>hostname</span> and <span class='inlinecode'>is</span> in that block and to decide whether the rest of the configuration should run at all. Features like <span class='inlinecode'>method_missing</span>, blocks, and the ability to change what <span class='inlinecode'>self</span> means in a block make this kind of DSL possible with very little code. You still get all the power of Ruby (conditionals, loops, helper methods), but the surface reads like a small language of its own.</span><br />
+<br />
+<h3 style='display: inline' id='a-bit-more-about-methodmissing'>A bit more about <span class='inlinecode'>method_missing</span></h3><br />
+<br />
+<span><span class='inlinecode'>method_missing</span> is one of the key tools that make the RCM DSL feel natural. In plain Ruby, if you call a method that does not exist, you get a <span class='inlinecode'>NoMethodError</span>. But before Ruby raises that error, it checks whether the object implements <span class='inlinecode'>method_missing</span>. If it does, Ruby calls that instead and lets the object decide what to do.</span><br />
+<br />
+<span>In RCM, you can write things like:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>given { hostname is :earth }
+</pre>
+<br />
+<span>Inside that block, calls such as <span class='inlinecode'>hostname</span> and <span class='inlinecode'>is</span> don&#39;t map to normal Ruby methods. Instead, RCM&#39;s DSL objects see those calls in <span class='inlinecode'>method_missing</span>, and interpret them as "check the current hostname" and "compare it to this symbol". This lets the DSL stay small and flexible: adding a new keyword can be as simple as handling another case in <span class='inlinecode'>method_missing</span>, without changing the Ruby syntax at all.</span><br />
+<br />
+<span>Put differently: you can write what looks like a tiny English sentence (<span class='inlinecode'>hostname is :earth</span>) and Ruby breaks it into method calls (<span class='inlinecode'>hostname</span>, then <span class='inlinecode'>is</span>) that RCM can interpret dynamically. Those "barewords" are not special syntax; they are just regular Ruby method names that the DSL catches and turns into configuration logic at runtime.</span><br />
+<br />
+<span>Here&#39;s a simplified sketch of how such a condition object could look in Ruby:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><b><u><font color="#000000">class</font></u></b> HostCondition
+ <b><u><font color="#000000">def</font></u></b> initialize
+ <b><font color="#000000">@current_hostname</font></b> = Socket.gethostname.to_sym
+ <b><u><font color="#000000">end</font></u></b>
+
+ <b><u><font color="#000000">def</font></u></b> method_missing(name, *args, &amp;)
+ <b><u><font color="#000000">case</font></u></b> name
+ <b><u><font color="#000000">when</font></u></b> :hostname
+ <b><font color="#000000">@left</font></b> = <b><font color="#000000">@current_hostname</font></b>
+ <b><u><font color="#000000">self</font></u></b> <i><font color="silver"># allow chaining: hostname is :earth</font></i>
+ <b><u><font color="#000000">when</font></u></b> :is
+ <b><font color="#000000">@left</font></b> == args.first
+ <b><u><font color="#000000">else</font></u></b>
+ <b><u><font color="#000000">super</font></u></b>
+ <b><u><font color="#000000">end</font></u></b>
+ <b><u><font color="#000000">end</font></u></b>
+<b><u><font color="#000000">end</font></u></b>
+
+HostCondition.new.hostname.is(:earth)
+</pre>
+<br />
+<span>RCM&#39;s real code is more sophisticated, but the idea is the same: Ruby happily calls <span class='inlinecode'>method_missing</span> for unknown methods like <span class='inlinecode'>hostname</span> and <span class='inlinecode'>is</span>, and the DSL turns those calls into a value (<span class='inlinecode'>true</span>/<span class='inlinecode'>false</span>) that decides whether the rest of the configuration should run.</span><br />
+<br />
+<h2 style='display: inline' id='ruby-metaprogramming-further-reading'>Ruby metaprogramming: further reading</h2><br />
+<br />
+<span>If you want to dive deeper into the ideas behind RCM&#39;s DSL, these books are great starting points:</span><br />
+<br />
+<ul>
+<li>"Metaprogramming Ruby 2" by Paolo Perrotta</li>
+<li>"The Well-Grounded Rubyist" by David A. Black (and others)</li>
+<li>"Eloquent Ruby" by Russ Olsen</li>
+</ul><br />
+<span>They all cover Ruby&#39;s object model, blocks, <span class='inlinecode'>method_missing</span>, and other metaprogramming techniques in much more detail than I can in a single blog post.</span><br />
+<br />
+<h2 style='display: inline' id='safety-dry-runs-and-debugging'>Safety, dry runs, and debugging</h2><br />
+<br />
+<span>RCM has a <span class='inlinecode'>--dry</span> mode: it logs what it would do without actually touching the file system. I use this when iterating on new configurations or refactoring existing ones. Combined with the built‑in logging and debug output, it&#39;s straightforward to see which resources were scheduled and in which order.</span><br />
+<br />
+<span>Because RCM is just Ruby, there&#39;s no separate agent protocol or daemon. The same process parses the DSL, resolves dependencies, and performs the actions. If something goes wrong, you can drop into the code, add a quick debug statement, and re‑run your configuration.</span><br />
+<br />
+<h2 style='display: inline' id='rcm-vs-puppet-and-other-big-tools'>RCM vs Puppet and other big tools</h2><br />
+<br />
+<span>RCM does not try to compete with Puppet, Chef, or Ansible on scale. Those tools shine when you manage hundreds or thousands of machines, have multiple teams contributing modules, and need centralised orchestration, reporting, and role‑based access control. They also come with their own DSLs, servers/agents, certificate handling, and a long list of resource types and modules. Ansible may be more similar to RCM than the other tools, but it&#39;s still much more complex than RCM.</span><br />
+<br />
+<span>For my personal use cases, that layer is mostly overhead. I want:</span><br />
+<br />
+<ul>
+<li>No extra daemon, message bus, or master node.</li>
+<li>No separate DSL to learn besides Ruby itself.</li>
+<li>A codebase small enough that I can understand and change all of it in an evening.</li>
+<li>Behaviour I can inspect just by reading the Ruby code.</li>
+</ul><br />
+<span>In that space RCM wins: it is small, transparent, and tuned for one person (me!) with a handful of personal machines or my Laptops. I still think tools like Puppet are the right choice for larger organisations and shared infrastructure, but RCM gives me a tiny, focused alternative for my own systems.</span><br />
+<br />
+<h2 style='display: inline' id='cutting-rcm-010'>Cutting RCM 0.1.0</h2><br />
+<br />
+<span>As of this post I&#39;m tagging and releasing **RCM 0.1.0**. About 99% of the code has been written by me so far, and before AI agents take over more of the boilerplate and wiring work, it felt like a good moment to cut a release and mark this mostly‑human baseline.</span><br />
+<br />
+<span>Future changes will very likely involve more automated help (including agents like the one you&#39;re reading this in), but 0.1.0 is the snapshot of the original, hand‑crafted version of the tool.</span><br />
+<br />
+<h2 style='display: inline' id='what-s-next'>What&#39;s next</h2><br />
+<br />
+<span>RCM already does what I need on my machines, but there are a few ideas I want to explore:</span><br />
+<br />
+<ul>
+<li>More resource types (for example, services and users) while keeping the core small.</li>
+<li>Additional package backends beyond Fedora/DNF (in particular MacOS brew).</li>
+<li>Managing hosts remotely.</li>
+<li>A slightly more structured way to organise larger configurations without losing the KISS spirit.</li>
+</ul><br />
+<h2 style='display: inline' id='feature-overview-selected'>Feature overview (selected)</h2><br />
+<br />
+<span>Here is a quick overview of what RCM can do today, grouped by area:</span><br />
+<br />
+<ul>
+<li>File management: <span class='inlinecode'>file &#39;/path&#39;</span>, <span class='inlinecode'>manage directory</span>, <span class='inlinecode'>from template</span>, <span class='inlinecode'>line &#39;...&#39;</span></li>
+<li>Packages: <span class='inlinecode'>package &#39;name&#39;</span> resources for installing and updating packages (currently focused on Fedora/DNF)</li>
+<li>Conditions and flow: <span class='inlinecode'>given { ... }</span> blocks, predicates such as <span class='inlinecode'>hostname is :earth</span></li>
+<li>Notifications and dependencies: <span class='inlinecode'>requires</span> between resources, <span class='inlinecode'>notify</span> for follow‑up actions</li>
+<li>Safety and execution modes: backups in <span class='inlinecode'>.rcmbackup/</span>, <span class='inlinecode'>--dry</span> runs, debug logging</li>
+</ul><br />
+<span>Some small examples adapted from RCM&#39;s own tests:</span><br />
+<br />
+<span>Template rendering into a file:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>configure <b><u><font color="#000000">do</font></u></b>
+ file <font color="#808080">'./.file_example.rcmtmp'</font> <b><u><font color="#000000">do</font></u></b>
+ from template
+ <font color="#808080">'One plus two is &lt;%= 1 + 2 %&gt;!'</font>
+ <b><u><font color="#000000">end</font></u></b>
+<b><u><font color="#000000">end</font></u></b>
+</pre>
+<br />
+<span>Ensuring a line is absent from a file:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>configure <b><u><font color="#000000">do</font></u></b>
+ file <font color="#808080">'./.file_example.rcmtmp'</font> <b><u><font color="#000000">do</font></u></b>
+ line <font color="#808080">'Whats up?'</font>
+ is absent
+ <b><u><font color="#000000">end</font></u></b>
+<b><u><font color="#000000">end</font></u></b>
+</pre>
+<br />
+<span>Keeping a backup of the original content when a file changes:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>configure <b><u><font color="#000000">do</font></u></b>
+ file original <b><u><font color="#000000">do</font></u></b>
+ path <font color="#808080">'./.dir_example.rcmtmp/foo/backup-me.txt'</font>
+ manage directory
+ <font color="#808080">'original_content'</font>
+ <b><u><font color="#000000">end</font></u></b>
+
+ file new <b><u><font color="#000000">do</font></u></b>
+ path <font color="#808080">'./.dir_example.rcmtmp/foo/backup-me.txt'</font>
+ manage directory
+ requires file original
+ <font color="#808080">'new_content'</font>
+ <b><u><font color="#000000">end</font></u></b>
+<b><u><font color="#000000">end</font></u></b>
+</pre>
+<br />
+<span>Guarding a configuration run on the current hostname:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>configure <b><u><font color="#000000">do</font></u></b>
+ given { hostname Socket.gethostname }
+<b><u><font color="#000000">end</font></u></b>
+</pre>
+<br />
+<span>Creating and deleting directories, and purging a directory tree:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>configure <b><u><font color="#000000">do</font></u></b>
+ directory <font color="#808080">'./.directory_example.rcmtmp'</font> <b><u><font color="#000000">do</font></u></b>
+ is present
+ <b><u><font color="#000000">end</font></u></b>
+
+ directory delete <b><u><font color="#000000">do</font></u></b>
+ path <font color="#808080">'./.directory_example.rcmtmp'</font>
+ is absent
+ <b><u><font color="#000000">end</font></u></b>
+<b><u><font color="#000000">end</font></u></b>
+</pre>
+<br />
+<span>Managing file and directory modes and ownership:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>configure <b><u><font color="#000000">do</font></u></b>
+ touch <font color="#808080">'./.mode_example.rcmtmp'</font> <b><u><font color="#000000">do</font></u></b>
+ mode 0o600
+ <b><u><font color="#000000">end</font></u></b>
+
+ directory <font color="#808080">'./.mode_example_dir.rcmtmp'</font> <b><u><font color="#000000">do</font></u></b>
+ mode 0o705
+ <b><u><font color="#000000">end</font></u></b>
+<b><u><font color="#000000">end</font></u></b>
+</pre>
+<br />
+<span>Using a chained, more natural language style for notifications:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>configure <b><u><font color="#000000">do</font></u></b>
+ notify hello dear world <b><u><font color="#000000">do</font></u></b>
+ thank you to be part of you
+ <b><u><font color="#000000">end</font></u></b>
+<b><u><font color="#000000">end</font></u></b>
+</pre>
+<br />
+<span>Touching files and updating their timestamps:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>configure <b><u><font color="#000000">do</font></u></b>
+ touch <font color="#808080">'./.touch_example.rcmtmp'</font>
+<b><u><font color="#000000">end</font></u></b>
+</pre>
+<br />
+<span>Expressing dependencies between notifications:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>configure <b><u><font color="#000000">do</font></u></b>
+ notify foo <b><u><font color="#000000">do</font></u></b>
+ requires notify bar <b><u><font color="#000000">and</font></u></b> requires notify baz
+ <font color="#808080">'foo_message'</font>
+ <b><u><font color="#000000">end</font></u></b>
+
+ notify bar
+
+ notify baz <b><u><font color="#000000">do</font></u></b>
+ requires notify bar
+ <font color="#808080">'baz_message'</font>
+ <b><u><font color="#000000">end</font></u></b>
+<b><u><font color="#000000">end</font></u></b>
+</pre>
+<br />
+<span>Creating and updating symbolic links:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>configure <b><u><font color="#000000">do</font></u></b>
+ symlink <font color="#808080">'./.symlink_example.rcmtmp'</font> <b><u><font color="#000000">do</font></u></b>
+ manage directory
+ <font color="#808080">'./.symlink_target_example.rcmtmp'</font>
+ <b><u><font color="#000000">end</font></u></b>
+<b><u><font color="#000000">end</font></u></b>
+</pre>
+<br />
+<span>Detecting duplicate resource definitions at configure time:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>configure <b><u><font color="#000000">do</font></u></b>
+ notify :foo
+ notify :foo <i><font color="silver"># raises RCM::DSL::DuplicateResource</font></i>
+<b><u><font color="#000000">end</font></u></b>
+</pre>
+<br />
+<span>If you find RCM interesting, feel free to browse the code, adapt it to your own setup, or just steal ideas for your own Ruby DSLs. I will probably extend it with more features over time as my own needs evolve.</span><br />
+<br />
+<span>E-Mail your comments to <span class='inlinecode'>paul@nospam.buetow.org</span> :-)</span><br />
+<br />
+<span>Other related posts:</span><br />
+<br />
+<a class='textlink' href='./2026-03-02-rcm-ruby-configuration-management-dsl.html'>2026-03-02 RCM: The Ruby Configuration Management DSL (You are currently reading this)</a><br />
+<a class='textlink' href='./2025-10-11-key-takeaways-from-the-well-grounded-rubyist.html'>2025-10-11 Key Takeaways from The Well-Grounded Rubyist</a><br />
+<a class='textlink' href='./2021-07-04-the-well-grounded-rubyist.html'>2021-07-04 The Well-Grounded Rubyist</a><br />
+<a class='textlink' href='./2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html'>2016-04-09 Jails and ZFS with Puppet on FreeBSD</a><br />
+<br />
+<a class='textlink' href='../'>Back to the main site</a><br />
+<p class="footer">
+ Generated with <a href="https://codeberg.org/snonux/gemtexter">Gemtexter 3.0.1-develop</a> |
+ served by <a href="https://www.OpenBSD.org">OpenBSD</a>/<a href="https://man.openbsd.org/relayd.8">relayd(8)</a>+<a href="https://man.openbsd.org/httpd.8">httpd(8)</a> |
+ <a href="https://foo.zone/site-mirrors.html">Site Mirrors</a>
+ <br />
+ Webring: <a href="https://shring.sh/foo.zone/previous">previous</a> | <a href="https://shring.sh">shring</a> | <a href="https://shring.sh/foo.zone/next">next</a>
+</p>
+</body>
+</html>