Skip to content

Commit cb1f7b5

Browse files
committed
docs(changelog): version 1.3.0 [citest skip]
Update changelog and .README.html for version 1.3.0 Signed-off-by: Rich Megginson <[email protected]>
1 parent c295253 commit cb1f7b5

File tree

2 files changed

+96
-30
lines changed

2 files changed

+96
-30
lines changed

.README.html

Lines changed: 89 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ <h1 class="toc-title">Contents</h1>
173173
<ul>
174174
<li><a href="#systemd_units"
175175
id="toc-systemd_units"><code>systemd_units</code></a></li>
176+
<li><a href="#systemd_units_user"
177+
id="toc-systemd_units_user"><code>systemd_units_user</code></a></li>
176178
</ul></li>
177179
<li><a href="#example-playbook" id="toc-example-playbook">Example
178180
Playbook</a></li>
@@ -189,7 +191,8 @@ <h1 class="toc-title">Contents</h1>
189191
units. Role is a convenience wrapper around systemd and template Ansible
190192
Core modules.</p>
191193
<h1 id="requirements">Requirements</h1>
192-
<p>See below</p>
194+
<p><em>NOTE:</em> Support for user units is not available in EL7 or
195+
earlier. This feature is only available in EL8 and later.</p>
193196
<h2 id="collection-requirements">Collection requirements</h2>
194197
<p>In order to manage <code>rpm-ostree</code> systems, the role requires
195198
modules from external collections. Use the following command to install
@@ -199,6 +202,22 @@ <h2 id="collection-requirements">Collection requirements</h2>
199202
<h1 id="role-variables">Role Variables</h1>
200203
<p>List of variables consumed by the role follows, note that none of
201204
them is mandatory.</p>
205+
<p>Each of the variables can either be a list of strings, or a list of
206+
<code>dicts</code>.</p>
207+
<p>The list of strings form assumes that the items to be managed are
208+
system units owned by <code>root</code>, and for files, assumes that the
209+
files should be <code>present</code>.</p>
210+
<p>The list of <code>dict</code> form looks like this:</p>
211+
<div class="sourceCode" id="cb2"><pre
212+
class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">systemd_unit_files</span><span class="kw">:</span></span>
213+
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">item</span><span class="kw">:</span><span class="at"> some.service</span></span>
214+
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">user</span><span class="kw">:</span><span class="at"> my_user</span></span>
215+
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">state</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at">present|absent</span><span class="kw">]</span></span></code></pre></div>
216+
<p>Use the <code>dict</code> form to manage user units, and to remove
217+
unit files. If using user units, the role will manage lingering for
218+
those users.</p>
219+
<p><em>NOTE:</em> Support for user units is not available in EL7 or
220+
earlier. This feature is only available in EL8 and later.</p>
202221
<h2 id="systemd_unit_files">systemd_unit_files</h2>
203222
<p>List of systemd unit file names that should be deployed to managed
204223
nodes.</p>
@@ -241,45 +260,85 @@ <h2 id="systemd_unmasked_units">systemd_unmasked_units</h2>
241260
required, allowing for custom handling of the reboot requirement. If
242261
this variable is not set, the role will fail to ensure the reboot
243262
requirement is not overlooked.</p>
244-
<p>Example of setting the variables:</p>
245-
<div class="sourceCode" id="cb2"><pre
246-
class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">systemd_unit_files</span><span class="kw">:</span></span>
247-
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> foo.service</span></span>
248-
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> bar.service</span></span>
249-
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="fu">systemd_dropins</span><span class="kw">:</span></span>
250-
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> cups.service.conf.j2</span></span>
251-
<span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> avahi-daemon.service.conf.j2</span></span>
252-
<span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a><span class="fu">systemd_started_units</span><span class="kw">:</span></span>
253-
<span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> foo.service</span></span>
254-
<span id="cb2-9"><a href="#cb2-9" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> bar.service</span></span>
255-
<span id="cb2-10"><a href="#cb2-10" aria-hidden="true" tabindex="-1"></a><span class="fu">systemd_enabled_units</span><span class="kw">:</span></span>
256-
<span id="cb2-11"><a href="#cb2-11" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> foo.service</span></span>
257-
<span id="cb2-12"><a href="#cb2-12" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> bar.service</span></span></code></pre></div>
263+
<p>Example of setting the variables for the simple list of strings
264+
format:</p>
265+
<div class="sourceCode" id="cb3"><pre
266+
class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">systemd_unit_files</span><span class="kw">:</span></span>
267+
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> foo.service</span></span>
268+
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> bar.service</span></span>
269+
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="fu">systemd_dropins</span><span class="kw">:</span></span>
270+
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> cups.service.conf.j2</span></span>
271+
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> avahi-daemon.service.conf.j2</span></span>
272+
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a><span class="fu">systemd_started_units</span><span class="kw">:</span></span>
273+
<span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> foo.service</span></span>
274+
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> bar.service</span></span>
275+
<span id="cb3-10"><a href="#cb3-10" aria-hidden="true" tabindex="-1"></a><span class="fu">systemd_enabled_units</span><span class="kw">:</span></span>
276+
<span id="cb3-11"><a href="#cb3-11" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> foo.service</span></span>
277+
<span id="cb3-12"><a href="#cb3-12" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> bar.service</span></span></code></pre></div>
278+
<p>Example of setting the variables for the list of <code>dict</code>
279+
format:</p>
280+
<div class="sourceCode" id="cb4"><pre
281+
class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">systemd_unit_files</span><span class="kw">:</span></span>
282+
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">item</span><span class="kw">:</span><span class="at"> foo.service</span></span>
283+
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">user</span><span class="kw">:</span><span class="at"> root</span></span>
284+
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">state</span><span class="kw">:</span><span class="at"> present</span></span>
285+
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">item</span><span class="kw">:</span><span class="at"> bar.service</span></span>
286+
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">user</span><span class="kw">:</span><span class="at"> my_user</span></span>
287+
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">state</span><span class="kw">:</span><span class="at"> absent</span></span>
288+
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true" tabindex="-1"></a><span class="fu">systemd_dropins</span><span class="kw">:</span></span>
289+
<span id="cb4-9"><a href="#cb4-9" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">item</span><span class="kw">:</span><span class="at"> cups.service.conf.j2</span></span>
290+
<span id="cb4-10"><a href="#cb4-10" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">user</span><span class="kw">:</span><span class="at"> root</span></span>
291+
<span id="cb4-11"><a href="#cb4-11" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">state</span><span class="kw">:</span><span class="at"> present</span></span>
292+
<span id="cb4-12"><a href="#cb4-12" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">item</span><span class="kw">:</span><span class="at"> avahi-daemon.service.conf.j2</span></span>
293+
<span id="cb4-13"><a href="#cb4-13" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">user</span><span class="kw">:</span><span class="at"> my_user</span></span>
294+
<span id="cb4-14"><a href="#cb4-14" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">state</span><span class="kw">:</span><span class="at"> absent</span></span>
295+
<span id="cb4-15"><a href="#cb4-15" aria-hidden="true" tabindex="-1"></a><span class="fu">systemd_started_units</span><span class="kw">:</span></span>
296+
<span id="cb4-16"><a href="#cb4-16" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">item</span><span class="kw">:</span><span class="at"> foo.service</span></span>
297+
<span id="cb4-17"><a href="#cb4-17" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">user</span><span class="kw">:</span><span class="at"> root</span></span>
298+
<span id="cb4-18"><a href="#cb4-18" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">item</span><span class="kw">:</span><span class="at"> bar.service</span></span>
299+
<span id="cb4-19"><a href="#cb4-19" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">user</span><span class="kw">:</span><span class="at"> my_user</span></span>
300+
<span id="cb4-20"><a href="#cb4-20" aria-hidden="true" tabindex="-1"></a><span class="fu">systemd_enabled_units</span><span class="kw">:</span></span>
301+
<span id="cb4-21"><a href="#cb4-21" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">item</span><span class="kw">:</span><span class="at"> foo.service</span></span>
302+
<span id="cb4-22"><a href="#cb4-22" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">user</span><span class="kw">:</span><span class="at"> root</span></span>
303+
<span id="cb4-23"><a href="#cb4-23" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">item</span><span class="kw">:</span><span class="at"> bar.service</span></span>
304+
<span id="cb4-24"><a href="#cb4-24" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">user</span><span class="kw">:</span><span class="at"> my_user</span></span></code></pre></div>
258305
<h1 id="variables-exported-by-the-role">Variables Exported by the
259306
Role</h1>
260307
<h2 id="systemd_units"><code>systemd_units</code></h2>
261-
<p>Variable shall contain a list of dictionaries where each entry
262-
describes state of one systemd unit present on the managed host.</p>
308+
<p>The variable is a <code>dict</code>. Each key is the name of a
309+
systemd unit. Each value is a dict with fields that describe the state
310+
of that systemd unit present on the managed host for the system
311+
scope.</p>
312+
<h2 id="systemd_units_user"><code>systemd_units_user</code></h2>
313+
<p>Variable shall contain a dict. Each key is the name of a user given
314+
in one of the lists passed to the role, and <code>root</code> (even if
315+
<code>root</code> is not given). Each value is a dict of systemd units
316+
for that user, or system units for <code>root</code>, in the format of
317+
<code>systemd_units</code> above.</p>
263318
<h1 id="example-playbook">Example Playbook</h1>
264-
<div class="sourceCode" id="cb3"><pre
265-
class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="kw">-</span><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> Deploy and start systemd unit</span></span>
266-
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">hosts</span><span class="kw">:</span><span class="at"> all</span></span>
267-
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">vars</span><span class="kw">:</span></span>
268-
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">systemd_unit_file_templates</span><span class="kw">:</span></span>
269-
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> foo.service.j2</span></span>
270-
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">systemd_started_units</span><span class="kw">:</span></span>
271-
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> foo.service</span></span>
272-
<span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">systemd_enabled_units</span><span class="kw">:</span></span>
273-
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> foo.service</span></span>
274-
<span id="cb3-10"><a href="#cb3-10" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">roles</span><span class="kw">:</span></span>
275-
<span id="cb3-11"><a href="#cb3-11" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> linux-system-roles.systemd</span></span></code></pre></div>
319+
<div class="sourceCode" id="cb5"><pre
320+
class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="kw">-</span><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> Deploy and start systemd unit</span></span>
321+
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">hosts</span><span class="kw">:</span><span class="at"> all</span></span>
322+
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">vars</span><span class="kw">:</span></span>
323+
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">systemd_unit_file_templates</span><span class="kw">:</span></span>
324+
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> foo.service.j2</span></span>
325+
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">systemd_started_units</span><span class="kw">:</span></span>
326+
<span id="cb5-7"><a href="#cb5-7" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">item</span><span class="kw">:</span><span class="at"> foo.service</span></span>
327+
<span id="cb5-8"><a href="#cb5-8" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">user</span><span class="kw">:</span><span class="at"> root</span></span>
328+
<span id="cb5-9"><a href="#cb5-9" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">item</span><span class="kw">:</span><span class="at"> bar.service</span></span>
329+
<span id="cb5-10"><a href="#cb5-10" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">user</span><span class="kw">:</span><span class="at"> my_user</span></span>
330+
<span id="cb5-11"><a href="#cb5-11" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">systemd_enabled_units</span><span class="kw">:</span></span>
331+
<span id="cb5-12"><a href="#cb5-12" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> foo.service</span></span>
332+
<span id="cb5-13"><a href="#cb5-13" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">roles</span><span class="kw">:</span></span>
333+
<span id="cb5-14"><a href="#cb5-14" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> linux-system-roles.systemd</span></span></code></pre></div>
276334
<h1 id="rpm-ostree">rpm-ostree</h1>
277335
<p>See README-ostree.md</p>
278336
<h1 id="license">License</h1>
279337
<p>MIT</p>
280338
<h1 id="author">Author</h1>
281339
<p>Michal Sekletar <a
282-
340+
href="mailto:[email protected]">[email protected]</a> Rich Megginson
341+
<a href="mailto:[email protected]">[email protected]</a></p>
283342
</article>
284343
</body>
285344
</html>

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Changelog
22
=========
33

4+
[1.3.0] - 2024-11-12
5+
--------------------
6+
7+
### New Features
8+
9+
- feat: support user units (#67)
10+
411
[1.2.1] - 2024-10-30
512
--------------------
613

0 commit comments

Comments
 (0)