Compare commits

..

3 commits

Author SHA1 Message Date
9229606588
Salt is back, I'm a glutton for punishment
All checks were successful
CI / test (push) Successful in 2m35s
2026-06-18 20:47:13 +10:00
fcbb3eb26b
ignore .lock file 2026-06-18 20:40:59 +10:00
d0d4bb5186
remove lock file 2026-06-18 20:40:47 +10:00
3 changed files with 11 additions and 3 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
*.swp
src/public
src/.hugo_build.lock

View file

View file

@ -18,16 +18,17 @@ summary: "Enroll can now render Puppet and Salt manifests alongside Ansible, det
<div class="row g-4">
<div class="col-lg-8">
<article class="feature-card p-4">
<p class="text-secondary">Welcome to the first of Enroll's new, erm, news section! To celebrate, Enroll 0.7.0 has been released, and makes manifest rendering target-selectable. Ansible remains the default, but Puppet and Salt are now possible too (with a few small exceptions, read on).</p>
<p class="text-secondary">Welcome to the first of Enroll's new, erm, news section! To celebrate, Enroll 0.7.0 has been released, and makes manifest rendering target-selectable based on your preferred config management tool! Ansible remains the default, but Puppet and Salt are now possible too (with a few small exceptions, read on).</p>
<h2 class="h4 fw-bold mt-4">Highlights</h2>
<ul>
<li><code>--target puppet</code> renders Puppet module/control-repo style output., and in <code>--fqdn</code> mode, renders per-host Hiera data.</li>
<li><code>--target salt</code> renders Salt state trees and, in <code>--fqdn</code> mode, Salt pillar data.</li>
<li><code>--target salt</code> renders Salt state trees and, in <code>--fqdn</code> mode, Salt pillar data. Since it's Python, it also will make use of JinjaTurtle (if it finds it on your <code>$PATH</code>) to render templates, just like Ansible!</li>
<li>Ansible works basically as it always did, and is the default, but you can specify <code>--target ansible</code> too. As usual, in <code>--fqdn</code> mode, specific artifacts end up in <code>host_vars</code> inventory folders rather than polluting the 'golden' roles.</li>
<li>All three config management manifest renderers derive from the same harvest state. You can rendered repeatedly into different config management tools without re-harvesting the host!</li>
<li>Single-site output tries to combine package/service data by their package manager's <code>Section</code> (or equivalent metadata), to reduce role/module/state sprawl.</li>
<li>Flatpak and Snap detection!</li>
<li>Docker image detection!</li>
</ul>
<h2 class="h4 fw-bold mt-4">Dry-run examples</h2>
@ -58,6 +59,8 @@ summary: "Enroll can now render Puppet and Salt manifests alongside Ansible, det
<h2 class="h4 fw-bold mt-4">Flatpak and Snap detection</h2>
<p class="text-secondary">Beyond deb and rpm</p>
<p>When using Ansible, Enroll now attempts to detect Flatpak and Snaps present on the system. For Flatpaks, this includes user-specific Flatpaks as well as system-wide ones. Manifesting to Ansible will attempt to use the <code>community.general</code> collection to create <a href="https://galaxy.ansible.com/ui/repo/published/community/general/content/module/flatpak/" target="_blank" rel="noopener noreferrer">Flatpak</a> and <a href="https://galaxy.ansible.com/ui/repo/published/community/general/content/module/snap/" target="_blank" rel="noopener noreferrer">Snap</a> tasks to enforce the presence of those packages.</p>
<p>For now, unfortunately Flatpak/Snap manifesting will not occur for Puppet or Snap, just Ansible. Either way, the 'detection' still occurs at the <code>harvest</code> level, so you can still take advantage of that with other subcommands like <code>enroll diff</code>.</p>
<div class="codeblock terminal">
<pre class="mb-0"><code id="news-070-snap"><span class="prompt">$</span> sudo ansible-playbook playbook.yml -i localhost, -c local --tags role_snap --diff
@ -77,6 +80,10 @@ ok: [localhost] => (item={'channel': 'latest/stable', 'classic': False, 'dangero
</code></pre>
</div>
<h2 class="h4 fw-bold mt-4">Docker image detection</h2>
<p class="text-secondary">Continuing to sniff out bits from your system...</p>
<p>The <code>harvest</code> now detects the presence of Docker images, if it has permission. In particular, it detects the SHA256 of the Docker image. All three renderers (Ansible, Salt and Puppet) will attempt to enforce the presence of those Docker images. For Puppet, you may need the <code>puppetlabs-docker</code> module installed. There are details in the manifested README.md of the Puppet code. For Ansible, you may need the <code>community.docker</code> collection, but on Debian 13 I found that it was already present by default in the official ansible Debian packages.</p>
<p>Please be aware that the Puppet and Salt renderers do not support the Flatpak/Snap package enforcement - only Ansible for now. You'll also need version 13+ of the <code>community.general</code> collection for this to work properly. A <code>requirements.yml</code> gets created with your manifest to help you install it if necessary.</p>
<h2 class="h4 fw-bold mt-4">Other smaller changes</h2>
@ -88,7 +95,7 @@ ok: [localhost] => (item={'channel': 'latest/stable', 'classic': False, 'dangero
</ul>
<h2 class="h4 fw-bold mt-4">See you soon..</h2>
<p>I'm off to try and write more tests - we're at 84% coverage in pytest, and we also run a stack of 'noop' executions for Ansible, Puppet and Salt too now, <a href="https://git.mig5.net/mig5/enroll/actions/runs/592" target="_blank" rel="noopener noreferrer">in CI</a>.</p>
<p>I'm off to try and write more tests - we're at 83% coverage in pytest, and we also run a stack of 'noop' executions for Ansible, Puppet and Salt too now, <a href="https://git.mig5.net/mig5/enroll/actions/runs/592" target="_blank" rel="noopener noreferrer">in CI</a>.</p>
<p>Thanks to everyone who has reached out with suggestions, constructive criticism, and bug reports! You're helping make Enroll better for everyone.</p>
</ul>