"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
-<!-- 2024-05-03 Fri 11:28 -->
+<!-- 2024-05-08 Wed 14:38 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Birchwood Abbey Networks</title>
philosophy, attitude.
</p>
-<pre class="example" id="org082e6ef">
+<pre class="example" id="org6cd3100">
|
=
_|||_
Dovecot-IMAPd, and hosting a VPN with OpenVPN.
</p>
</div>
-<div id="outline-container-orgecfc877" class="outline-3">
-<h3 id="orgecfc877"><span class="section-number-3">3.1.</span> Install Emacs</h3>
+<div id="outline-container-org5fad937" class="outline-3">
+<h3 id="org5fad937"><span class="section-number-3">3.1.</span> Install Emacs</h3>
<div class="outline-text-3" id="text-3-1">
<p>
The monks of the abbey are masters of the staff (bo) and Emacs.
<span class="org-variable-name">apache2_module: name</span>=rewrite
notify: Restart Apache2.
-- name: Enable Apache2 cgid module for Gitweb (Ubuntu).
+- name: Enable Apache2 cgid module.
become: yes
<span class="org-variable-name">apache2_module: name</span>=cgid
- <span class="org-variable-name">when: ansible_distribution</span> == <span class="org-string">'Ubuntu'</span>
- notify: Restart Apache2.
-
-- name: Enable Apache2 cgi module for Gitweb (Debian).
- become: yes
- <span class="org-variable-name">apache2_module: name</span>=cgi
- <span class="org-variable-name">when: ansible_distribution</span> == <span class="org-string">'Debian'</span>
notify: Restart Apache2.
- name: Install libcgi-pm-perl for Gitweb.
entered as shown below).
</p>
-<pre class="example" id="orgbd1d3d6">
+<pre class="example" id="org251b0c7">
$ sudo apt install python3-certbot-apache
$ sudo certbot --apache -d birchwood-abbey.net
...
NTP, DNS and DHCP.
</p>
</div>
-<div id="outline-container-org16234a2" class="outline-3">
-<h3 id="org16234a2"><span class="section-number-3">4.1.</span> Include Abbey Variables</h3>
+<div id="outline-container-org51ebdb0" class="outline-3">
+<h3 id="org51ebdb0"><span class="section-number-3">4.1.</span> Include Abbey Variables</h3>
<div class="outline-text-3" id="text-4-1">
<p>
In this abbey specific document, most abbey particulars are not
</div>
</div>
</div>
-<div id="outline-container-org1f64af9" class="outline-3">
-<h3 id="org1f64af9"><span class="section-number-3">4.8.</span> Use Cloister Apt Cache</h3>
+<div id="outline-container-orga2bd985" class="outline-3">
+<h3 id="orga2bd985"><span class="section-number-3">4.8.</span> Use Cloister Apt Cache</h3>
<div class="outline-text-3" id="text-4-8">
<p>
Core itself will benefit from using the package cache.
is not associated with a member of the small institute.
</p>
</div>
-<div id="outline-container-orga2bd985" class="outline-3">
-<h3 id="orga2bd985"><span class="section-number-3">6.1.</span> Use Cloister Apt Cache</h3>
+<div id="outline-container-orge45cd0c" class="outline-3">
+<h3 id="orge45cd0c"><span class="section-number-3">6.1.</span> Use Cloister Apt Cache</h3>
<div class="outline-text-3" id="text-6-1">
<p>
The Apt-Cacher:TNG program does not work well on the frontier, so is
</div>
</div>
</div>
-<div id="outline-container-org5fad937" class="outline-3">
-<h3 id="org5fad937"><span class="section-number-3">6.3.</span> Install Emacs</h3>
+<div id="outline-container-org3c54304" class="outline-3">
+<h3 id="org3c54304"><span class="section-number-3">6.3.</span> Install Emacs</h3>
<div class="outline-text-3" id="text-6-3">
<p>
The monks of the abbey are masters of the staff and Emacs.
below. A test session is shown below.
</p>
-<pre class="example" id="org7c26516">
+<pre class="example" id="org68684e4">
monkey@new$ owdir
...
/26.2153B6000000/
<span class="org-comment-delimiter"># </span><span class="org-comment">Fetches data from the local owserver once per minute. Appends to</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">Log/{In,Out}side/YEAR/MONTH/DAY.txt.</span>
-<span class="org-constant">use</span> strict;
-<span class="org-constant">use</span> IO::File;
-<span class="org-constant">use</span> Date::Format;
+<span class="org-keyword">use</span> <span class="org-constant">strict</span>;
+<span class="org-keyword">use</span> <span class="org-constant">IO::File</span>;
+<span class="org-keyword">use</span> <span class="org-constant">Date::Format</span>;
-<span class="org-type">my</span> $<span class="org-variable-name">ILOG</span>;
-<span class="org-type">my</span> $<span class="org-variable-name">OLOG</span>;
-<span class="org-type">my</span> $<span class="org-variable-name">ymd</span> = <span class="org-string">""</span>;
+<span class="org-keyword">my</span> $<span class="org-variable-name">ILOG</span>;
+<span class="org-keyword">my</span> $<span class="org-variable-name">OLOG</span>;
+<span class="org-keyword">my</span> $<span class="org-variable-name">ymd</span> = <span class="org-string">""</span>;
<span class="org-keyword">sub</span> <span class="org-function-name">mymkdir</span> ($);
<span class="org-keyword">sub</span> <span class="org-function-name">reopen_logs</span> ()
{
- <span class="org-type">my</span> $<span class="org-variable-name">time</span> = time;
- <span class="org-type">my</span> $<span class="org-variable-name">datime</span> = time2str (<span class="org-string">"%Y-%m-%d %H:%M:%S"</span>, $<span class="org-variable-name">time</span>, <span class="org-string">"UTC"</span>);
- <span class="org-type">my</span> ($<span class="org-variable-name">year</span>, $<span class="org-variable-name">month</span>, $<span class="org-variable-name">day</span>) = $<span class="org-variable-name">datime</span> =~ <span class="org-string">/^(\d{4})-(\d\d)-(\d\d) /</span>;
- <span class="org-type">my</span> $<span class="org-variable-name">new_ymd</span> = <span class="org-string">"$year/$month/$day"</span>;
+ <span class="org-keyword">my</span> $<span class="org-variable-name">time</span> = time;
+ <span class="org-keyword">my</span> $<span class="org-variable-name">datime</span> = time2str (<span class="org-string">"%Y-%m-%d %H:%M:%S"</span>, $<span class="org-variable-name">time</span>, <span class="org-string">"UTC"</span>);
+ <span class="org-keyword">my</span> ($<span class="org-variable-name">year</span>, $<span class="org-variable-name">month</span>, $<span class="org-variable-name">day</span>) = $<span class="org-variable-name">datime</span> =~ <span class="org-string">/^(\d{4})-(\d\d)-(\d\d) /</span>;
+ <span class="org-keyword">my</span> $<span class="org-variable-name">new_ymd</span> = <span class="org-string">"$year/$month/$day"</span>;
<span class="org-keyword">return</span> <span class="org-keyword">if</span> $<span class="org-variable-name">new_ymd</span> eq $<span class="org-variable-name">ymd</span>;
close $<span class="org-variable-name">ILOG</span> <span class="org-keyword">if</span> defined $<span class="org-variable-name">ILOG</span>;
close $<span class="org-variable-name">OLOG</span> <span class="org-keyword">if</span> defined $<span class="org-variable-name">OLOG</span>;
mymkdir <span class="org-string">"Inside/$year/$month"</span>;
mymkdir <span class="org-string">"Outside/$year/$month"</span>;
umask 027;
- <span class="org-type">my</span> $<span class="org-variable-name">filename</span> = <span class="org-string">"Inside/$new_ymd.txt"</span>;
+ <span class="org-keyword">my</span> $<span class="org-variable-name">filename</span> = <span class="org-string">"Inside/$new_ymd.txt"</span>;
$<span class="org-variable-name">ILOG</span> = new IO::File;
open $<span class="org-variable-name">ILOG</span>, <span class="org-string">">>$filename"</span> or <span class="org-keyword">die</span> <span class="org-string">"Could not open $filename: $!\n"</span>;
$<span class="org-variable-name">filename</span> = <span class="org-string">"Outside/$new_ymd.txt"</span>;
<span class="org-keyword">sub</span> <span class="org-function-name">logit</span> ($$$);
<span class="org-keyword">sub</span> <span class="org-function-name">main</span> () {
- <span class="org-keyword">die</span> <span class="org-string">"usage: $0\n"</span> <span class="org-keyword">if</span> @<span class="org-underline"><span class="org-variable-name">ARGV</span></span> != 0;
+ <span class="org-keyword">die</span> <span class="org-string">"usage: $0\n"</span> <span class="org-keyword">if</span> @<span class="org-perl-non-scalar-variable">ARGV</span> != 0;
$<span class="org-variable-name">0</span> = <span class="org-string">"weatherd"</span>;
chdir <span class="org-string">"/home/monkey/Weather/Log"</span> or <span class="org-keyword">die</span>;
umask 027;
- <span class="org-type">my</span> $<span class="org-variable-name">start</span> = time;
+ <span class="org-keyword">my</span> $<span class="org-variable-name">start</span> = time;
{
- <span class="org-type">my</span> $<span class="org-variable-name">secs</span> = 60 - $<span class="org-variable-name">start</span> % 60;
+ <span class="org-keyword">my</span> $<span class="org-variable-name">secs</span> = 60 - $<span class="org-variable-name">start</span> % 60;
$<span class="org-variable-name">start</span> += $<span class="org-variable-name">secs</span>;
sleep ($<span class="org-variable-name">secs</span>);
}
logit $<span class="org-variable-name">ILOG</span>, <span class="org-string">"T"</span>, <span class="org-string">"/26.8859B6000000/temperature"</span>;
logit $<span class="org-variable-name">ILOG</span>, <span class="org-string">"H"</span>, <span class="org-string">"/26.8859B6000000/HIH4000/humidity"</span>;
$<span class="org-variable-name">start</span> += 60;
- <span class="org-type">my</span> $<span class="org-variable-name">now</span> = time;
+ <span class="org-keyword">my</span> $<span class="org-variable-name">now</span> = time;
<span class="org-keyword">while</span> ($<span class="org-variable-name">start</span> < $<span class="org-variable-name">now</span>) { $<span class="org-variable-name">start</span> += 60; }
- <span class="org-type">my</span> $<span class="org-variable-name">secs</span> = $<span class="org-variable-name">start</span> - $<span class="org-variable-name">now</span>;
+ <span class="org-keyword">my</span> $<span class="org-variable-name">secs</span> = $<span class="org-variable-name">start</span> - $<span class="org-variable-name">now</span>;
sleep ($<span class="org-variable-name">secs</span>);
}
}
<span class="org-keyword">sub</span> <span class="org-function-name">logit</span> ($$$)
{
- <span class="org-type">my</span> ($<span class="org-variable-name">log</span>, $<span class="org-variable-name">name</span>, $<span class="org-variable-name">query</span>) = @<span class="org-underline"><span class="org-variable-name">_</span></span>;
+ <span class="org-keyword">my</span> ($<span class="org-variable-name">log</span>, $<span class="org-variable-name">name</span>, $<span class="org-variable-name">query</span>) = @<span class="org-perl-non-scalar-variable">_</span>;
- <span class="org-type">my</span> $<span class="org-variable-name">tries</span> = 0;
+ <span class="org-keyword">my</span> $<span class="org-variable-name">tries</span> = 0;
<span class="org-keyword">while</span> ($<span class="org-variable-name">tries</span> < 3) {
- <span class="org-type">my</span> $<span class="org-variable-name">time</span> = time;
- <span class="org-type">my</span> $<span class="org-variable-name">datime</span> = time2str (<span class="org-string">"%Y-%m-%d %H:%M:%S"</span>, $<span class="org-variable-name">time</span>, <span class="org-string">"UTC"</span>);
+ <span class="org-keyword">my</span> $<span class="org-variable-name">time</span> = time;
+ <span class="org-keyword">my</span> $<span class="org-variable-name">datime</span> = time2str (<span class="org-string">"%Y-%m-%d %H:%M:%S"</span>, $<span class="org-variable-name">time</span>, <span class="org-string">"UTC"</span>);
$<span class="org-variable-name">tries</span> += 1;
- <span class="org-type">my</span> @<span class="org-underline"><span class="org-variable-name">lines</span></span> = <span class="org-string">`/usr/bin/owread $query`</span>;
- chomp @<span class="org-underline"><span class="org-variable-name">lines</span></span>;
- <span class="org-type">my</span> $<span class="org-variable-name">status</span> = $?;
- <span class="org-type">my</span> $<span class="org-variable-name">sig</span> = $<span class="org-variable-name">status</span> & 127;
+ <span class="org-keyword">my</span> @<span class="org-perl-non-scalar-variable">lines</span> = <span class="org-string">`/usr/bin/owread $query`</span>;
+ chomp @<span class="org-perl-non-scalar-variable">lines</span>;
+ <span class="org-keyword">my</span> $<span class="org-variable-name">status</span> = $?;
+ <span class="org-keyword">my</span> $<span class="org-variable-name">sig</span> = $<span class="org-variable-name">status</span> & 127;
$<span class="org-variable-name">status</span> >>= 8;
<span class="org-keyword">if</span> ($<span class="org-variable-name">status</span> != 0) {
- <span class="org-type">my</span> $<span class="org-variable-name">L</span> = join <span class="org-string">"\\n"</span>, @<span class="org-underline"><span class="org-variable-name">lines</span></span>;
+ <span class="org-keyword">my</span> $<span class="org-variable-name">L</span> = join <span class="org-string">"\\n"</span>, @<span class="org-perl-non-scalar-variable">lines</span>;
print $<span class="org-variable-name">log</span> <span class="org-string">"$datime\t$name\terror: status $status: $L\n"</span>;
$<span class="org-variable-name">log</span>->flush;
- } <span class="org-keyword">elsif</span> (@<span class="org-underline"><span class="org-variable-name">lines</span></span> != 1) {
- <span class="org-type">my</span> $<span class="org-variable-name">L</span> = join <span class="org-string">"\\n"</span>, @<span class="org-underline"><span class="org-variable-name">lines</span></span>;
+ } <span class="org-keyword">elsif</span> (@<span class="org-perl-non-scalar-variable">lines</span> != 1) {
+ <span class="org-keyword">my</span> $<span class="org-variable-name">L</span> = join <span class="org-string">"\\n"</span>, @<span class="org-perl-non-scalar-variable">lines</span>;
print $<span class="org-variable-name">log</span> <span class="org-string">"$datime\t$name\terror: multiple lines: $L\n"</span>;
$<span class="org-variable-name">log</span>->flush;
} <span class="org-keyword">elsif</span> ($<span class="org-variable-name">lines</span>[0] !~ <span class="org-string">/^ *(-?\d+(\.\d+)?)$/</span>) {
- <span class="org-type">my</span> $<span class="org-variable-name">L</span> = $<span class="org-variable-name">lines</span>[0];
+ <span class="org-keyword">my</span> $<span class="org-variable-name">L</span> = $<span class="org-variable-name">lines</span>[0];
print $<span class="org-variable-name">log</span> <span class="org-string">"$datime\t$name\terror: bogus line: $L\n"</span>;
$<span class="org-variable-name">log</span>->flush;
} <span class="org-keyword">else</span> {
- <span class="org-type">my</span> $<span class="org-variable-name">datum</span> = $<span class="org-variable-name">1</span>;
+ <span class="org-keyword">my</span> $<span class="org-variable-name">datum</span> = $<span class="org-variable-name">1</span>;
print $<span class="org-variable-name">log</span> <span class="org-string">"$datime\t$name\t$datum\n"</span>;
$<span class="org-variable-name">log</span>->flush;
<span class="org-keyword">return</span>;
<span class="org-keyword">sub</span> <span class="org-function-name">mymkdir</span> ($)
{
- <span class="org-type">my</span> ($<span class="org-variable-name">dirpath</span>) = @<span class="org-underline"><span class="org-variable-name">_</span></span>;
+ <span class="org-keyword">my</span> ($<span class="org-variable-name">dirpath</span>) = @<span class="org-perl-non-scalar-variable">_</span>;
- <span class="org-type">my</span> @<span class="org-underline"><span class="org-variable-name">path_names</span></span> = split <span class="org-string">/\//</span>, $<span class="org-variable-name">dirpath</span>;
- <span class="org-type">my</span> $<span class="org-variable-name">path</span>;
+ <span class="org-keyword">my</span> @<span class="org-perl-non-scalar-variable">path_names</span> = split <span class="org-string">/\//</span>, $<span class="org-variable-name">dirpath</span>;
+ <span class="org-keyword">my</span> $<span class="org-variable-name">path</span>;
<span class="org-keyword">if</span> (!$<span class="org-variable-name">path_names</span>[0]) {
$<span class="org-variable-name">path</span> = <span class="org-string">"/"</span>;
- shift @<span class="org-underline"><span class="org-variable-name">path_names</span></span>;
+ shift @<span class="org-perl-non-scalar-variable">path_names</span>;
} <span class="org-keyword">else</span> {
$<span class="org-variable-name">path</span> = <span class="org-string">"."</span>;
}
- <span class="org-type">my</span> @<span class="org-underline"><span class="org-variable-name">created</span></span>;
- <span class="org-keyword">while</span> (@<span class="org-underline"><span class="org-variable-name">path_names</span></span>) {
- $<span class="org-variable-name">path</span> .= <span class="org-string">"/"</span> . shift @<span class="org-underline"><span class="org-variable-name">path_names</span></span>;
+ <span class="org-keyword">my</span> @<span class="org-perl-non-scalar-variable">created</span>;
+ <span class="org-keyword">while</span> (@<span class="org-perl-non-scalar-variable">path_names</span>) {
+ $<span class="org-variable-name">path</span> .= <span class="org-string">"/"</span> . shift @<span class="org-perl-non-scalar-variable">path_names</span>;
<span class="org-keyword">if</span> (! -d $<span class="org-variable-name">path</span>) {
<span class="org-keyword">if</span> (-e $<span class="org-variable-name">path</span>) {
<span class="org-keyword">die</span> <span class="org-string">"mkdir $dirpath: already exists; not a directory!\n"</span>;
<span class="org-keyword">die</span> <span class="org-string">"mkdir $path: $!\n"</span>;
} <span class="org-keyword">else</span> {
chmod 02775, $<span class="org-variable-name">path</span>;
- push @<span class="org-underline"><span class="org-variable-name">created</span></span>, $<span class="org-variable-name">path</span>;
+ push @<span class="org-perl-non-scalar-variable">created</span>, $<span class="org-variable-name">path</span>;
}
}
}
- <span class="org-keyword">return</span> @<span class="org-underline"><span class="org-variable-name">created</span></span>;
+ <span class="org-keyword">return</span> @<span class="org-perl-non-scalar-variable">created</span>;
}
main;
<h3 id="orgfe87cd1"><span class="section-number-3">7.4.</span> Install 1-Wire Server</h3>
<div class="outline-text-3" id="text-7-4">
<p>
-The following task installs the 1-Wire server and shell commands. The
+This next task installs the 1-Wire server and shell commands. The
abbey uses the Dallas Semiconductor DS9490R, a USB to 1-Wire adapter,
on all its weather hosts, so it also configures the server to use the
USB adapter (rather than a test "fake" adapter).
executed during the initial phase of configuration, allowing the
administrator to login on the new weather host as <code>monkey</code> and thus to
test access to the 1-Wire adapter and devices. To facilitate
-debugging the <code>sysadm</code> account is included in the <code>monkey</code> group.
+debugging, the <code>sysadm</code> account is included in the <code>monkey</code> group.
</p>
<div class="org-src-container">
</p>
</div>
</div>
-<div id="outline-container-orga126b56" class="outline-3">
-<h3 id="orga126b56"><span class="section-number-3">8.4.</span> Include Abbey Variables</h3>
+<div id="outline-container-orgf821b20" class="outline-3">
+<h3 id="orgf821b20"><span class="section-number-3">8.4.</span> Include Abbey Variables</h3>
<div class="outline-text-3" id="text-8-4">
<p>
Private variables in <q>private/vars-abbey.yml</q> are needed, and included
become: yes
apache2_module:
name: <span class="org-string">"{{ item }}"</span>
- loop: [ cgi, rewrite, expires, headers ]
+ loop: [ cgid, rewrite, expires, headers ]
notify: Restart Apache2.
- name: Enable Zoneminder Apache configuration.
<span class="org-variable-name">line: date.timezone</span> = {{ lookup(<span class="org-string">'file'</span>, <span class="org-string">'/etc/timezone'</span>) }}
path: <span class="org-string">"{{ item }}"</span>
loop:
- - /etc/php/7.4/cli/php.ini
- - /etc/php/7.4/apache2/php.ini
+ - /etc/php/8.2/cli/php.ini
+ - /etc/php/8.2/apache2/php.ini
notify: Restart Apache2.
- name: Enable/Start Apache2.
</p>
</div>
</div>
-<div id="outline-container-org51ebdb0" class="outline-3">
-<h3 id="org51ebdb0"><span class="section-number-3">9.3.</span> Include Abbey Variables</h3>
+<div id="outline-container-orgbbd0c82" class="outline-3">
+<h3 id="orgbbd0c82"><span class="section-number-3">9.3.</span> Include Abbey Variables</h3>
<div class="outline-text-3" id="text-9-3">
<p>
Private variables in <q>private/vars-abbey.yml</q> are needed, as in the
<span class="org-variable-name">line: date.timezone</span> = {{ lookup(<span class="org-string">'file'</span>, <span class="org-string">'/etc/timezone'</span>) }}
path: <span class="org-string">"{{ item }}"</span>
loop:
- - /etc/php/7.4/cli/php.ini
- - /etc/php/7.4/apache2/php.ini
+ - /etc/php/8.2/cli/php.ini
+ - /etc/php/8.2/apache2/php.ini
when: mythtv.stat.exists
notify: Restart Apache2.
</pre>
the OTA (over the air) broadcasts.
</p>
-<pre class="example" id="org074ad94">
+<pre class="example" id="orga364723">
$ tv_grab_zz_sdjson --configure --config-file .mythtv/Mr.Antenna.xml
Cache file for lineups, schedules and programs.
Cache file: [/home/mythtv/.xmltv/tv_grab_zz_sdjson.cache]
<span class="org-comment-delimiter">#</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">DO NOT EDIT. This file was tangled from README.org.</span>
-<span class="org-constant">use</span> strict;
+<span class="org-keyword">use</span> <span class="org-constant">strict</span>;
<span class="org-keyword">if</span> (grep { $<span class="org-variable-name">_</span> eq $<span class="org-variable-name">ARGV</span>[0] } qw<span class="org-string">(CA config new old pass client)</span>) {
- <span class="org-keyword">exec</span> <span class="org-string">"./Institute/inst"</span>, @<span class="org-underline"><span class="org-variable-name">ARGV</span></span>;
+ <span class="org-keyword">exec</span> <span class="org-string">"./Institute/inst"</span>, @<span class="org-perl-non-scalar-variable">ARGV</span>;
}
</pre>
</div>
<a href="abbey"><q>abbey</q></a><pre class="src src-perl">
<span class="org-keyword">if</span> ($<span class="org-variable-name">ARGV</span>[0] eq <span class="org-string">"upgrade"</span>) {
shift;
- <span class="org-type">my</span> @<span class="org-underline"><span class="org-variable-name">args</span></span> = ( <span class="org-string">"-e"</span>, <span class="org-string">"\@Secret/become.yml"</span> );
+ <span class="org-keyword">my</span> @<span class="org-perl-non-scalar-variable">args</span> = ( <span class="org-string">"-e"</span>, <span class="org-string">"\@Secret/become.yml"</span> );
<span class="org-keyword">if</span> (defined $<span class="org-variable-name">ARGV</span>[0] && $<span class="org-variable-name">ARGV</span>[0] eq <span class="org-string">"-n"</span>) {
shift;
- push @<span class="org-underline"><span class="org-variable-name">args</span></span>, <span class="org-string">"--check"</span>, <span class="org-string">"--diff"</span>;
+ push @<span class="org-perl-non-scalar-variable">args</span>, <span class="org-string">"--check"</span>, <span class="org-string">"--diff"</span>;
}
<span class="org-keyword">if</span> (defined $<span class="org-variable-name">ARGV</span>[0]) {
- <span class="org-type">my</span> $<span class="org-variable-name">limit</span> = $<span class="org-variable-name">ARGV</span>[0];
+ <span class="org-keyword">my</span> $<span class="org-variable-name">limit</span> = $<span class="org-variable-name">ARGV</span>[0];
shift;
<span class="org-keyword">die</span> <span class="org-string">"illegal characters: $limit"</span>
<span class="org-keyword">if</span> $<span class="org-variable-name">limit</span> !~ <span class="org-string">/^!?[a-z][-a-z0-9,!]+$/</span>;
- push @<span class="org-underline"><span class="org-variable-name">args</span></span>, <span class="org-string">"-l"</span>, $<span class="org-variable-name">limit</span>;
+ push @<span class="org-perl-non-scalar-variable">args</span>, <span class="org-string">"-l"</span>, $<span class="org-variable-name">limit</span>;
}
- <span class="org-keyword">exec</span> (<span class="org-string">"ansible-playbook"</span>, @<span class="org-underline"><span class="org-variable-name">args</span></span>, <span class="org-string">"playbooks/upgrade.yml"</span>);
+ <span class="org-keyword">exec</span> (<span class="org-string">"ansible-playbook"</span>, @<span class="org-perl-non-scalar-variable">args</span>, <span class="org-string">"playbooks/upgrade.yml"</span>);
}
</pre>
</div>
<div class="org-src-container">
<a href="abbey"><q>abbey</q></a><pre class="src src-perl"><span class="org-keyword">if</span> ($<span class="org-variable-name">ARGV</span>[0] eq <span class="org-string">"tz"</span>) {
- <span class="org-type">my</span> $<span class="org-variable-name">city</span> = <span class="org-string">`cat /etc/timezone`</span>; chomp $<span class="org-variable-name">city</span>;
- <span class="org-type">my</span> $<span class="org-variable-name">zone</span> = <span class="org-string">`date +%Z`</span>; chomp $<span class="org-variable-name">zone</span>;
+ <span class="org-keyword">my</span> $<span class="org-variable-name">city</span> = <span class="org-string">`cat /etc/timezone`</span>; chomp $<span class="org-variable-name">city</span>;
+ <span class="org-keyword">my</span> $<span class="org-variable-name">zone</span> = <span class="org-string">`date +%Z`</span>; chomp $<span class="org-variable-name">zone</span>;
print <span class="org-string">"Setting timezones to $city.\n"</span>;
<span class="org-keyword">exec</span> (<span class="org-string">"ansible-playbook"</span>, <span class="org-string">"-e"</span>, <span class="org-string">"\@Secret/become.yml"</span>,
<span class="org-string">"-e"</span>, <span class="org-string">"zone=$zone"</span>, <span class="org-string">"-e"</span>, <span class="org-string">"city=$city"</span>,
command: timedatectl set-timezone {{ city }}
<span class="org-variable-name">when: ansible_date_time.tz !</span>= zone
register: new_tz
- <span class="org-variable-name">- debug: msg</span>={{ new_tz }}
- hosts: dvrs
tasks:
<span class="org-variable-name">line: date.timezone</span> = {{ city }}
path: <span class="org-string">"{{ item }}"</span>
loop:
- - /etc/php/7.4/cli/php.ini
- - /etc/php/7.4/apache2/php.ini
+ - /etc/php/8.2/cli/php.ini
+ - /etc/php/8.2/apache2/php.ini
notify: Restart Apache2.
handlers:
- name: Restart Apache2.
<h3 id="org773e94c"><span class="section-number-3">11.7.</span> Abbey Command Help</h3>
<div class="outline-text-3" id="text-11-7">
<div class="org-src-container">
-<a href="abbey"><q>abbey</q></a><pre class="src src-perl"><span class="org-type">my</span> $<span class="org-variable-name">ops</span> = <span class="org-string">"config,new,old,pass,client,upgrade,reboots,versions,tz"</span>;
+<a href="abbey"><q>abbey</q></a><pre class="src src-perl"><span class="org-keyword">my</span> $<span class="org-variable-name">ops</span> = <span class="org-string">"config,new,old,pass,client,upgrade,reboots,versions,tz"</span>;
<span class="org-keyword">die</span> <span class="org-string">"usage: $0 [$ops]\n"</span>;
</pre>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Matt Birkholz</p>
-<p class="date">Created: 2024-05-03 Fri 11:28</p>
+<p class="date">Created: 2024-05-08 Wed 14:38</p>
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>