<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/atom.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Posts tagged: ansible</title>
  <id>https://waylonwalker.com/tags/ansible/atom.xml</id>
  <updated>2026-02-26T09:59:57Z</updated>
  <subtitle>All posts with the tag &#34;ansible&#34;</subtitle>
  <link href="https://waylonwalker.com/tags/ansible/" rel="alternate" type="text/html"></link>
  <link href="https://waylonwalker.com/tags/ansible/atom.xml" rel="self" type="application/atom+xml"></link>
  <author>
    <name>Waylon Walker</name>
  </author>
  <generator uri="https://github.com/WaylonWalker/markata-go">markata-go</generator>
  <entry>
    <title>Vaulted Secrets Without Git Churn</title>
    <id>https://waylonwalker.com/vaulted-secrets-without-git-churn/</id>
    <updated>2026-02-26T09:59:57Z</updated>
    <published>2026-02-26T09:59:57Z</published>
    <link href="https://waylonwalker.com/vaulted-secrets-without-git-churn/" rel="alternate" type="text/html"></link>
    <summary type="text">Ansible Vault keeps secrets out of sight, but the ciphertext changes on every encrypt. That turns Git diffs into noise and makes it hard to tell if anything...</summary>
    <content type="html">&lt;p&gt;Ansible Vault keeps secrets out of sight, but the ciphertext changes on every&#xA;encrypt. That turns &lt;a href=&#34;/glossary/git/&#34; class=&#34;glossary-term&#34; title=&#34;Git is a version control system for tracking changes in source code during software development. In the beginning there were many, some were licensed. As...&#34;&gt;Git&lt;/a&gt; diffs into noise and makes it hard to tell if anything&#xA;actually changed. Decrypting, editing, and re-encrypting often leaves&#xA;uncertainty about whether any plaintext changed. This is amplified when secret&#xA;repos are tightly coupled to dependent repositories. A typical cycle includes&#xA;decrypting, adding a key, updating a value, applying changes, and returning&#xA;later with little clarity about what changed while secrets were in plaintext.&lt;/p&gt;&#xA;&lt;p&gt;Today a new workflow was created with @gpt-5.2-codex to keep diffs clean and&#xA;avoid re-encrypting when the plaintext is identical.&lt;/p&gt;&#xA;&lt;div class=&#34;admonition chat-reply&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;&lt;span class=&#34;chat-contact&#34;&gt;&lt;a href=&#34;/8bitcc.png&#34; class=&#34;glightbox-link&#34;&gt;&lt;img class=&#34;chat-contact-avatar glightbox&#34; src=&#34;/8bitcc.png&#34; alt=&#34;Waylon Walker&#34;/ data-glightbox=&#34;description: Waylon Walker&#34;&gt;&lt;/a&gt;&lt;span class=&#34;chat-contact-name&#34;&gt;Waylon Walker&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;This repo has ansible vaulted secrets and an encrypt/decrypt process, but no&#xA;way to compare. Please research compare options. The goal is to avoid&#xA;changing files on encrypt/decrypt when plaintext is unchanged, ideally by&#xA;comparing decrypted content and reusing the remote encrypted file.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;admonition chat&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;@gpt-5.2-codex&lt;/p&gt;&#xA;&lt;p&gt;The repo workflow will be reviewed, compare options identified, and a&#xA;low-churn GitOps approach proposed to avoid re-encrypt noise.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;the-problem&#34;&gt;The problem &lt;a href=&#34;#the-problem&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Re-encrypting a file with the same content produces different ciphertext. A&#xA;simple decrypt/encrypt cycle can look like a full file change, even when the&#xA;plaintext is identical. That creates uncertainty and makes GitOps workflows feel&#xA;brittle.&lt;/p&gt;&#xA;&lt;div class=&#34;admonition chat-reply&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;&lt;span class=&#34;chat-contact&#34;&gt;&lt;a href=&#34;/8bitcc.png&#34; class=&#34;glightbox-link&#34;&gt;&lt;img class=&#34;chat-contact-avatar glightbox&#34; src=&#34;/8bitcc.png&#34; alt=&#34;Waylon Walker&#34;/ data-glightbox=&#34;description: Waylon Walker&#34;&gt;&lt;/a&gt;&lt;span class=&#34;chat-contact-name&#34;&gt;Waylon Walker&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;Minimal changes needed to keep GitOps clear?&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;admonition chat&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;@gpt-5.2-codex&lt;/p&gt;&#xA;&lt;p&gt;Add compare-before-encrypt, decrypted diffs, and ignore cache artifacts.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;the-solution-at-a-glance&#34;&gt;The solution at a glance &lt;a href=&#34;#the-solution-at-a-glance&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Three pieces make it work:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Compare-before-encrypt&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;just decrypt&lt;/code&gt; stores a plaintext hash and caches the current encrypted&#xA;file.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;just encrypt&lt;/code&gt; compares the plaintext hash and, if unchanged, restores the&#xA;cached ciphertext instead of re-encrypting.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Readable diffs for vaulted files&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;.gitattributes&lt;/code&gt; sets &lt;code&gt;private/* diff=ansible-vault&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;A small &lt;code&gt;textconv&lt;/code&gt; script decrypts for &lt;code&gt;git diff&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Ignored cache artifacts&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;.vault-hashes/&lt;/code&gt; and &lt;code&gt;.vault-cache/&lt;/code&gt; are ignored so they never hit the&#xA;repo.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;how-it-works&#34;&gt;How it works &lt;a href=&#34;#how-it-works&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;div class=&#34;admonition chat-reply&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;&lt;span class=&#34;chat-contact&#34;&gt;&lt;a href=&#34;/8bitcc.png&#34; class=&#34;glightbox-link&#34;&gt;&lt;img class=&#34;chat-contact-avatar glightbox&#34; src=&#34;/8bitcc.png&#34; alt=&#34;Waylon Walker&#34;/ data-glightbox=&#34;description: Waylon Walker&#34;&gt;&lt;/a&gt;&lt;span class=&#34;chat-contact-name&#34;&gt;Waylon Walker&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;How does compare-before-encrypt operate?&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;admonition chat&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;@gpt-5.2-codex&lt;/p&gt;&#xA;&lt;p&gt;Hash plaintext on decrypt, reuse cached ciphertext on encrypt if the hash matches.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;compare-before-encrypt&#34;&gt;Compare-before-encrypt &lt;a href=&#34;#compare-before-encrypt&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;When a file is decrypted, a SHA-256 hash of the plaintext is created and stored&#xA;in &lt;code&gt;.vault-hashes/&lt;/code&gt;. A copy of the encrypted file is stored in &lt;code&gt;.vault-cache/&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;When encrypting, the current plaintext file is hashed. If the hash matches the&#xA;cached hash, the cached encrypted file is restored instead of generating new&#xA;ciphertext. Result: no churn when nothing actually changed.&lt;/p&gt;&#xA;&lt;h3 id=&#34;decrypted-diffs&#34;&gt;Decrypted diffs &lt;a href=&#34;#decrypted-diffs&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Git is configured to use &lt;code&gt;ansible-vault view&lt;/code&gt; as a text conversion step for&#xA;files under &lt;code&gt;private/&lt;/code&gt;. As a result, &lt;code&gt;git diff&lt;/code&gt; shows decrypted content instead&#xA;of ciphertext.&lt;/p&gt;&#xA;&lt;p&gt;Enable the diff driver locally:&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git config diff.ansible-vault.textconv &lt;span class=&#34;s2&#34;&gt;&amp;#34;scripts/ansible-vault-diff&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;what-changes-will-be-seen&#34;&gt;What changes will be seen &lt;a href=&#34;#what-changes-will-be-seen&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If a secret changes: the diff shows the plaintext change.&lt;/li&gt;&#xA;&lt;li&gt;If decrypt and re-encrypt occurs without changes: the diff stays clean.&lt;/li&gt;&#xA;&lt;li&gt;Large base64 blobs may still look like full-line diffs because they are&#xA;single-line values.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;div class=&#34;admonition chat-reply&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;&lt;span class=&#34;chat-contact&#34;&gt;&lt;a href=&#34;/8bitcc.png&#34; class=&#34;glightbox-link&#34;&gt;&lt;img class=&#34;chat-contact-avatar glightbox&#34; src=&#34;/8bitcc.png&#34; alt=&#34;Waylon Walker&#34;/ data-glightbox=&#34;description: Waylon Walker&#34;&gt;&lt;/a&gt;&lt;span class=&#34;chat-contact-name&#34;&gt;Waylon Walker&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;What is the day-to-day workflow?&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;admonition chat&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;@gpt-5.2-codex&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;`just decrypt`, edit, then `just encrypt`. Clean diffs, no churn.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;recommended-usage&#34;&gt;Recommended usage &lt;a href=&#34;#recommended-usage&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;just decrypt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# apply edits&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;just encrypt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That is sufficient to keep Git history clean and reduce uncertainty about&#xA;whether a secret actually changed.&lt;/p&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>💭 Ansible Galaxy - amazon.aws</title>
    <id>https://waylonwalker.com/thought-440/</id>
    <updated>2024-12-05T00:06:23Z</updated>
    <published>2024-12-05T00:06:23Z</published>
    <link href="https://waylonwalker.com/thought-440/" rel="alternate" type="text/html"></link>
    <summary type="text">!https://galaxy.ansible.com/ui/repo/published/amazon/aws/content/module/s3_bucket/#examples</summary>
    <content type="html">&lt;div class=&#34;embed-card embed-card-external&#34;&gt;&#xA;  &lt;a href=&#34;https://galaxy.ansible.com/ui/repo/published/amazon/aws/content/module/s3_bucket/#examples&#34; class=&#34;embed-card-link  has-avatar has-avatar-before&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/galaxy.ansible.com.ico&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/galaxy.ansible.com.ico&#34;&gt;&#xA;    &lt;div class=&#34;embed-card-content&#34;&gt;&#xA;      &lt;div class=&#34;embed-card-title&#34;&gt;Ansible Galaxy&lt;/div&gt;&#xA;      &lt;div class=&#34;embed-card-meta&#34;&gt;galaxy.ansible.com&lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Great examples for working with s3 buckets with ansible.&lt;/p&gt;&#xA;&lt;div class=&#34;admonition note&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;Note&lt;/p&gt;&#xA;&lt;p&gt;This post is a &lt;a href=&#34;/thoughts/&#34; class=&#34;wikilink&#34; data-title=&#34;Thoughts&#34; data-description=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34; data-date=&#34;2024-04-01&#34; data-preview=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34;&gt;thought&lt;/a&gt;. It’s a short note that I make&#xA;about someone else’s content online &lt;a href=&#34;/tags/thoughts/&#34; class=&#34;hashtag-tag&#34; data-tag=&#34;thoughts&#34; data-count=&#34;2&#34; data-reading-time=&#34;3&#34; data-reading-time-text=&#34;3 minutes&#34;&gt;#thoughts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>Installing system nerd-fonts with ansible</title>
    <id>https://waylonwalker.com/ansible_install_fonts/</id>
    <updated>2021-12-25T20:24:48Z</updated>
    <published>2021-12-25T20:24:48Z</published>
    <link href="https://waylonwalker.com/ansible_install_fonts/" rel="alternate" type="text/html"></link>
    <summary type="text">Lately I&#39;ve been on a journey to really clean up my dotfiles, and I was completely missing fonts. I noticed jumping into a new vm I had a bunch of broken...</summary>
    <content type="html">&lt;p&gt;Lately I’ve been on a journey to really clean up my dotfiles, and I was&#xA;completely missing fonts.  I noticed jumping into a new vm I had a bunch&#xA;of broken devicons when using Telescope with the devicons plugins.&lt;/p&gt;&#xA;&lt;p&gt;This is one of those things that can be a total pain to get right on&#xA;some systems, and it’s so nice when it’s just there for you pretty much&#xA;out of the box.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;make sure your user fonts directory exists&lt;/li&gt;&#xA;&lt;li&gt;chech if the font you want exists on your machine&lt;/li&gt;&#xA;&lt;li&gt;download and unzip fonts into the fonts directory&lt;/li&gt;&#xA;&lt;li&gt;repeat 2-3 for all the fonts you use on your system&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;- &lt;span class=&#34;nt&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;ensure fonts directory&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;file&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;path&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;{{ lookup(&amp;#39;env&amp;#39;, &amp;#39;HOME&amp;#39;) }}/.fonts&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;state&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;directory&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;- &lt;span class=&#34;nt&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;Hack exists&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;shell&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;ls {{ lookup(&amp;#39;env&amp;#39;, &amp;#39;HOME&amp;#39;) }}/.fonts/Hack*Nerd*Font*Complete*&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;register&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;hack_exists&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ignore_errors&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;yes&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;- &lt;span class=&#34;nt&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;Download Hack&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;when&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;hack_exists is failed&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ansible.builtin.unarchive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/Hack.zip&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dest&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;{{ lookup(&amp;#39;env&amp;#39;, &amp;#39;HOME&amp;#39;) }}/.fonts/&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;remote_src&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;yes&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=2MEmsinxRK4&#34; class=&#34;hoverlink  has-avatar has-avatar-before&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/www.youtube.com.png&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/www.youtube.com.png&#34;&gt;https://www.youtube.com/watch?v=2MEmsinxRK4&lt;/a&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I made a YT based on this post&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;links&#34;&gt;Links &lt;a href=&#34;#links&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;ansible docs for &lt;a href=&#34;https://docs.ansible.com/ansible/latest/collections/ansible/builtin/unarchive_module.html&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/docs.ansible.com.png&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/docs.ansible.com.png&#34; class=&#34;has-avatar  has-avatar-before&#34;&gt;builtin.unarchive&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;a href=&#34;/setup-yamlls/&#34; class=&#34;wikilink&#34; data-title=&#34;Setup a yaml schema | yamlls for a silky smooth setup&#34; data-description=&#34;I&amp;#39;ve gone far too long without a good setup for editing yaml files, I am missing out on autocomplete and proper diagnostics. This ends today as I setup...&#34; data-date=&#34;2021-12-03&#34; data-preview=&#34;I&amp;#39;ve gone far too long without a good setup for editing yaml files, I am missing out on autocomplete and proper diagnostics. This ends today as I setup...&#34;&gt;Setup a yaml schema | yamlls for a silky smooth setup&lt;/a&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;check out how I install yamlls using ansible&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>Installing packages with ansible only if they do not exist</title>
    <id>https://waylonwalker.com/ansible_install_if_not_callable/</id>
    <updated>2021-12-24T20:24:48Z</updated>
    <published>2021-12-24T20:24:48Z</published>
    <link href="https://waylonwalker.com/ansible_install_if_not_callable/" rel="alternate" type="text/html"></link>
    <summary type="text">Part of my neovim setup requires having the python formatter installed and callable. I install it with so that I don&#39;t have to manage a virtual environment...</summary>
    <content type="html">&lt;p&gt;Part of my neovim setup requires having the &lt;code&gt;black&lt;/code&gt; python formatter&#xA;installed and callable.  I install it with &lt;code&gt;pipx&lt;/code&gt; so that I don’t have&#xA;to manage a &lt;a href=&#34;/virtual-environment/&#34; class=&#34;glossary-term&#34; title=&#34;Virtual Environment is term for a sandboxed environment commonly associated with the python programming language. If you are installing any sort of python...&#34;&gt;virtual environment&lt;/a&gt; and have it available everywhere.  So&#xA;far this works well for me, if there are ever breaking changes I may&#xA;need to rethink this.&lt;/p&gt;&#xA;&lt;p&gt;re-installing a bunch of things that are already installed can be quite&#xA;a waste and really add up to my ansible run time, so for most of my&#xA;ansible tasks that install a command like this I have been following&#xA;this pattern.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;check if the command is installed with &lt;code&gt;command -v &amp;lt;command&amp;gt;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;register that step&lt;/li&gt;&#xA;&lt;li&gt;ignore if that step fails&lt;/li&gt;&#xA;&lt;li&gt;add a &lt;code&gt;when: &amp;lt;xxx&amp;gt;_exists is failed&lt;/code&gt; condition to the step that&#xA;installs that command.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;- &lt;span class=&#34;nt&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;check is black installed&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;shell&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;command -v black&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;register&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;black_exists&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ignore_errors&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;yes&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;- &lt;span class=&#34;nt&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;install black&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;when&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;black_exists is failed&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;shell&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;pipx install black&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=MCFg6-W5SBI&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/www.youtube.com.png&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/www.youtube.com.png&#34; class=&#34;has-avatar  has-avatar-before&#34;&gt;https://www.youtube.com/watch?v=MCFg6-W5SBI&lt;/a&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I made a video based on this post, check it out if its your thing&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
</feed>