Skip to content

Commit 1b78f04

Browse files
committed
Site update
1 parent 22e0127 commit 1b78f04

46 files changed

Lines changed: 1438 additions & 393 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2023/08/11/local-management-with-rex/index.html

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ <h2 id="basic-anatomy-of-rex-task-definitions"><a href="#basic-anatomy-of-rex-ta
9797
<p>I’ll not go into all details here to allow us staying aware of further
9898
internals while focusing on the general approach.</p>
9999

100-
<h2 id="tasks-without-an-explicit-target"><a href="#tasks-without-an-explicit-target">Tasks without an explicit target</a></h2>
100+
</section>
101+
<section id="section-3">
102+
<h2 id="tasks-without-an-explicit-target"><a href="#tasks-without-an-explicit-target">Tasks without an explicit target</a></h2>
101103

102104
<p>Tasks without any explicit target get executed on the local machine directly:</p>
103105

@@ -125,7 +127,9 @@ <h2 id="tasks-without-an-explicit-target"><a href="#tasks-without-an-explicit-ta
125127
task)</a>
126128
section in the documentation.</p>
127129

128-
<h2 id="tasks-targeting-local-explicitly"><a href="#tasks-targeting-local-explicitly">Tasks targeting <code>&lt;local&gt;</code> explicitly</a></h2>
130+
</section>
131+
<section id="section-4">
132+
<h2 id="tasks-targeting-local-explicitly"><a href="#tasks-targeting-local-explicitly">Tasks targeting <code>&lt;local&gt;</code> explicitly</a></h2>
129133

130134
<p>One may intentionally design a task to manage the local machine by using the
131135
special <code>&lt;local&gt;</code> hostname recognized by Rex:</p>
@@ -142,7 +146,9 @@ <h2 id="tasks-targeting-local-explicitly"><a href="#tasks-targeting-local-explic
142146
<code>-H</code> or <code>-G</code> options, or with the <code>on</code> option of
143147
<a href="https://metacpan.org/pod/Rex::Commands#run_task"><code>run_task</code></a> from code.</p>
144148

145-
<h2 id="override-the-tasks-target-to-local"><a href="#override-the-tasks-target-to-local">Override the task’s target to <code>&lt;local&gt;</code></a></h2>
149+
</section>
150+
<section id="section-5">
151+
<h2 id="override-the-tasks-target-to-local"><a href="#override-the-tasks-target-to-local">Override the task’s target to <code>&lt;local&gt;</code></a></h2>
146152

147153
<p>The <code>-H</code> command line option supports the same special <code>&lt;local&gt;</code> hostname:</p>
148154

@@ -166,7 +172,9 @@ <h2 id="override-the-tasks-target-to-local"><a href="#override-the-tasks-target-
166172
<p>This approach allows users to intentionally choose local execution, regardless
167173
of a task having an explicit target or not.</p>
168174

169-
<h2 id="disable-ssh-per-task-with-no_ssh-task"><a href="#disable-ssh-per-task-with-no_ssh-task">Disable SSH per task with <code>no_ssh task</code></a></h2>
175+
</section>
176+
<section id="section-6">
177+
<h2 id="disable-ssh-per-task-with-no_ssh-task"><a href="#disable-ssh-per-task-with-no_ssh-task">Disable SSH per task with <code>no_ssh task</code></a></h2>
170178

171179
<p>The <code>no_ssh</code> command hints individual tasks to not use SSH:</p>
172180

@@ -190,7 +198,9 @@ <h2 id="disable-ssh-per-task-with-no_ssh-task"><a href="#disable-ssh-per-task-wi
190198
<p>See also the <a href="https://metacpan.org/pod/Rex::Commands#no_ssh">no_ssh</a>
191199
documentation.</p>
192200

193-
<h2 id="disable-ssh-globally-with-no_ssh"><a href="#disable-ssh-globally-with-no_ssh">Disable SSH globally with <code>no_ssh</code></a></h2>
201+
</section>
202+
<section id="section-7">
203+
<h2 id="disable-ssh-globally-with-no_ssh"><a href="#disable-ssh-globally-with-no_ssh">Disable SSH globally with <code>no_ssh</code></a></h2>
194204

195205
<p>In case none of the tasks need SSH to connect to their targets, the <code>no_ssh</code>
196206
command can disable it globally:</p>
@@ -212,7 +222,9 @@ <h2 id="disable-ssh-globally-with-no_ssh"><a href="#disable-ssh-globally-with-no
212222
<p>See also the <a href="https://metacpan.org/pod/Rex::Commands#no_ssh">no_ssh</a>
213223
documentation.</p>
214224

215-
<h2 id="running-parts-of-a-task-within-local-blocks"><a href="#running-parts-of-a-task-within-local-blocks">Running parts of a task within <code>LOCAL{}</code> blocks</a></h2>
225+
</section>
226+
<section id="section-8">
227+
<h2 id="running-parts-of-a-task-within-local-blocks"><a href="#running-parts-of-a-task-within-local-blocks">Running parts of a task within <code>LOCAL{}</code> blocks</a></h2>
216228

217229
<p>Wrapping parts of the task steps in a <code>LOCAL{}</code> block forces these to run on
218230
the local machine instead of on the target in effect otherwise:</p>
@@ -233,7 +245,9 @@ <h2 id="running-parts-of-a-task-within-local-blocks"><a href="#running-parts-of-
233245
<p>See also the <a href="https://metacpan.org/pod/Rex::Commands#LOCAL">LOCAL</a>
234246
documentation.</p>
235247

236-
<h2 id="connect-to-local-host-over-ssh"><a href="#connect-to-local-host-over-ssh">Connect to local host over SSH</a></h2>
248+
</section>
249+
<section id="section-9">
250+
<h2 id="connect-to-local-host-over-ssh"><a href="#connect-to-local-host-over-ssh">Connect to local host over SSH</a></h2>
237251

238252
<p>Using the identity of the local machine as target makes it possible to treat it
239253
the same way as remotes, including connecting to it using SSH like to any

2025/02/26/virtues-of-rex/index.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ <h3 id="concerned-about-using-perl"><a href="#concerned-about-using-perl">Concer
165165
community of users and developers.</p>
166166
</blockquote>
167167

168-
<h2 id="empower-users-through-trust"><a href="#empower-users-through-trust">Empower users through trust</a></h2>
168+
</section>
169+
<section id="section-3">
170+
<h2 id="empower-users-through-trust"><a href="#empower-users-through-trust">Empower users through trust</a></h2>
169171

170172
<p>Silver bullets work best when the challenge involves fighting werewolves. Other
171173
situations tend to have more effective and less expensive solutions.</p>
@@ -314,7 +316,9 @@ <h4 id="push-and-pull"><a href="#push-and-pull">Push and pull</a></h4>
314316
receive hook, which executes <code>rex converge</code> upon <code>git push</code>. Don’t forget to
315317
use some locking to avoid overlapping execution of both, though.</p>
316318

317-
<h2 id="enable-graceful-bootstrapping"><a href="#enable-graceful-bootstrapping">Enable graceful bootstrapping</a></h2>
319+
</section>
320+
<section id="section-4">
321+
<h2 id="enable-graceful-bootstrapping"><a href="#enable-graceful-bootstrapping">Enable graceful bootstrapping</a></h2>
318322

319323
<p>Getting started with automation initiatives may feel cumbersome or
320324
intimidating. It often involves having to convince team members and decisions
@@ -367,7 +371,9 @@ <h3 id="my-personal-getting-started-story"><a href="#my-personal-getting-started
367371
solutions, while staying so lightweight compared to alternatives. Ultimately
368372
that experience drove me to learn Modern Perl properly, and start contributing.</p>
369373

370-
<h2 id="epilogue"><a href="#epilogue">Epilogue</a></h2>
374+
</section>
375+
<section id="section-5">
376+
<h2 id="epilogue"><a href="#epilogue">Epilogue</a></h2>
371377

372378
<p>These principles establish Rex, the friendly automation framework as a powerful
373379
alternative among infrastructure automation and configuration management

2025/03/05/installing-rex/index.html

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ <h2 id="install-from-cpan"><a href="#install-from-cpan">Install from CPAN</a></h
101101
clean working environment to use Rex, isolating it from the system’s own Perl
102102
installations.</p>
103103

104-
<h2 id="use-package-managers"><a href="#use-package-managers">Use package managers</a></h2>
104+
</section>
105+
<section id="section-3">
106+
<h2 id="use-package-managers"><a href="#use-package-managers">Use package managers</a></h2>
105107

106108
<p>Thanks to the generous effort of package maintainers, many operating systems
107109
ship Rex through their own official package repositories. For a known list of
@@ -132,7 +134,9 @@ <h2 id="use-package-managers"><a href="#use-package-managers">Use package manage
132134
versions, please let both us and the package maintainers know, so we may figure
133135
out an even more streamlined delivery together.</p>
134136

135-
<h2 id="build-from-source"><a href="#build-from-source">Build from source</a></h2>
137+
</section>
138+
<section id="section-4">
139+
<h2 id="build-from-source"><a href="#build-from-source">Build from source</a></h2>
136140

137141
<p>Even with publishing trial releases to CPAN during development, sometimes it
138142
fits best to use an unreleased version of Rex. For example:</p>
@@ -176,7 +180,9 @@ <h3 id="installation"><a href="#installation">Installation</a></h3>
176180
install</code></li>
177181
</ol>
178182

179-
<h2 id="verifying-the-installation"><a href="#verifying-the-installation">Verifying the installation</a></h2>
183+
</section>
184+
<section id="section-5">
185+
<h2 id="verifying-the-installation"><a href="#verifying-the-installation">Verifying the installation</a></h2>
180186

181187
<p>After installation, check the current version with the following command:</p>
182188

@@ -189,7 +195,9 @@ <h2 id="verifying-the-installation"><a href="#verifying-the-installation">Verify
189195
<pre><code class="highlight">$ rex <span class="synSpecial">-e</span> <span class="synOperator">&#39;</span><span class="synString">say run q(hostname)</span><span class="synOperator">&#39;</span>
190196
</code></pre>
191197

192-
<h2 id="summary"><a href="#summary">Summary</a></h2>
198+
</section>
199+
<section id="section-6">
200+
<h2 id="summary"><a href="#summary">Summary</a></h2>
193201

194202
<p>We looked at the main options to install Rex, their similarities and
195203
differences, as well as how to quickly verify the results.</p>
@@ -207,6 +215,9 @@ <h2 id="summary"><a href="#summary">Summary</a></h2>
207215
</a>
208216
</li>
209217
<li class="next">
218+
<a href="/2025/03/12/perl-basics-for-rex/index.html" rel="next">
219+
Newer →
220+
</a>
210221
</li>
211222
</ul>
212223

0 commit comments

Comments
 (0)