<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Jq on ads' corner</title><link>https://andreas.scherbaum.la/tags/jq/</link><description>Recent content in Jq on ads' corner</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 20 Mar 2022 00:08:00 +0100</lastBuildDate><atom:link href="https://andreas.scherbaum.la/tags/jq/index.xml" rel="self" type="application/rss+xml"/><item><title>Read a JSON text into a variable in Ansible without parsing it</title><link>https://andreas.scherbaum.la/post/2022-03-20_read-a-json-text-into-a-variable-in-ansible-without-parsing-it/</link><pubDate>Sun, 20 Mar 2022 00:08:00 +0100</pubDate><guid>https://andreas.scherbaum.la/post/2022-03-20_read-a-json-text-into-a-variable-in-ansible-without-parsing-it/</guid><description>&lt;p&gt;For one project I need to insert the content of a local file into another file on the remote system, and the first file happens to be &lt;em&gt;JSON&lt;/em&gt;. The &lt;em&gt;JSON&lt;/em&gt; file is in compact format (&lt;code&gt;jq --compact-output&lt;/code&gt;) and is supposed to stay this way. When &lt;em&gt;Ansible&lt;/em&gt; reads the content of the file, it determines that the content is &lt;em&gt;JSON&lt;/em&gt;, and parses the content into the variable - and along the way is uncompressing the format. Not what I want.&lt;/p&gt;&#10;&lt;p&gt;To keep the file content as string, it is necessary to tell &lt;em&gt;Ansible&lt;/em&gt; to handle this as string.&lt;/p&gt;</description></item><item><title>Restic backup</title><link>https://andreas.scherbaum.la/post/2020-12-27_restic-backup/</link><pubDate>Sun, 27 Dec 2020 23:47:00 +0100</pubDate><guid>https://andreas.scherbaum.la/post/2020-12-27_restic-backup/</guid><description>&lt;p&gt;Was asked quite a few times how I do my backups with &lt;em&gt;Restic&lt;/em&gt;.&lt;/p&gt;&#10;&lt;p&gt;For more than 10 years I was using &amp;ldquo;&lt;a href="https://github.com/andreasscherbaum/duplicity-backup"&gt;Duplicity&lt;/a&gt;&amp;rdquo; for backups, but in 2019 I changed to &lt;a href="https://restic.net/"&gt;Restic&lt;/a&gt;. The main reason for the change was that &lt;em&gt;Duplicity&lt;/em&gt; still can&amp;rsquo;t handle &amp;ldquo;Big Data&amp;rdquo;, as in: larger directories. In 2009 someone opened an &lt;a href="https://bugs.launchpad.net/duplicity/+bug/385495"&gt;issue&lt;/a&gt; on the &lt;em&gt;Duplicity&lt;/em&gt; bugtracker, and this problem still exists as of today. For about two years I was shifting around the problem, excluding files, trying to make the sigfile smaller. But at some point I decided that it is enough and I need to change the tool.&lt;/p&gt;</description></item><item><title>Update openHAB Things configuration using Ansible</title><link>https://andreas.scherbaum.la/post/2018-07-03_update-openhab-things-configuration-using-ansible/</link><pubDate>Tue, 03 Jul 2018 15:16:00 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2018-07-03_update-openhab-things-configuration-using-ansible/</guid><description>&lt;p&gt;In my &lt;a href="https://andreas.scherbaum.la/post/2018-07-01_install-openhab2-bindings-using-ansible/"&gt;earlier&lt;/a&gt; &lt;a href="https://andreas.scherbaum.la/post/2018-07-02_auto-approve-and-link-certain-inbox-items-in-openhab-using-ansible/"&gt;openHAB&lt;/a&gt; &lt;a href="https://andreas.scherbaum.la/categories/openhab"&gt;blog posts&lt;/a&gt; I automated the installation of extensions and linking of &lt;em&gt;Channels&lt;/em&gt; to &lt;em&gt;Items&lt;/em&gt;. Another problem I&amp;rsquo;m facing is the configuration of items. Again, that&amp;rsquo;s very easy in the UI - if you are willing to click through the list of &lt;em&gt;Items&lt;/em&gt;, and manually do all the steps.&lt;/p&gt;&#10;&lt;p&gt;Among other things I&amp;rsquo;m using the &lt;code&gt;binding-yahooweather&lt;/code&gt; and the &lt;code&gt;binding-ipp&lt;/code&gt; bindings, and the first one needs configuration before it can work properly. For the second one, it righly discovered a laser printer in our network, but occasionally when &lt;em&gt;openHAB&lt;/em&gt; requests the status information, this spins up an internal disk in the printer. Therefore it is feasible to increase the time between checks - it&amp;rsquo;s just the number of outstanding print jobs anyway. Doesn&amp;rsquo;t matter if someone reacts 5 or 15 minutes later, if the problem was not discovered instantly.&lt;/p&gt;</description></item><item><title>Install openHAB2 bindings using Ansible</title><link>https://andreas.scherbaum.la/post/2018-07-01_install-openhab2-bindings-using-ansible/</link><pubDate>Sun, 01 Jul 2018 11:33:00 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2018-07-01_install-openhab2-bindings-using-ansible/</guid><description>&lt;p&gt;Recently I started looking into Home Automation, using a &lt;a href="https://en.wikipedia.org/wiki/Raspberry_Pi"&gt;Raspberry Pi&lt;/a&gt; and the &lt;a href="https://www.openhab.org/"&gt;openHAB&lt;/a&gt; as platform. The website provides ready-to-go images based on &lt;em&gt;Debian&lt;/em&gt;, named &lt;a href="https://docs.openhab.org/installation/openhabian.html"&gt;openHABian&lt;/a&gt;. Me being me, I decided to install the image, let it boot up for the first time, and then take it from there using &lt;a href="https://www.ansible.com/"&gt;Ansible&lt;/a&gt; as automation tool. That&amp;rsquo;s a bit more effort in the beginning, but ensures that I can always just wipe the SDcard, and start over from the beginning. Especially useful if I screw up at some point during testing.&lt;/p&gt;</description></item></channel></rss>