Ansibleprovides a rich pattern matching ability. Modules like lineinfile can match strings based on regular expressions. Similar expressions are used in Python, Perl and older tools such as egrep, grep, sed and awk.
When attempting to match a string containing awkward characters, an escape mechanism can be used. For example, the dollar character ($) has a special meaning within in a regular expression, being the match for end-of-line. So to match a literal dollar, an escape character, usually a backslash (\), is needed. For example, the regular expression “\$1.65” will successfully match $1.65, without treating $ as end of line.
When processing a string that contains many special characters, the escape syntax can become onerous. One solution is to just “blanket” match the special character, rather than trying to match it precisely. In other words: just use a dot. Continue reading →
Nextcloud is an open source software package providing remote file sharing services. It is similar to Dropbox. But with Nextcloud, you retain ownership, security and control of the shared data. This procedure describes how to build a working Nextcloud service using just 3 commands. It has been tested on Raspbian Stretch and on the Raspberry Pi 4 / Raspbian Buster (this article last updated 14/1/2020)
Note: If you would rather do the installation manually, step-by-step, without the help of a script, please see my previous article “Simple Nextcloud Installation on Raspberry Pi“. It explains how to do the installation in detail, and provides more background information on Nextcloud. Both procedures achieve the same overall result, however.
Note: If you are running Raspbian Buster, then Nextcloud 17 will be installed. For Stretch, it’s Nextcloud 15.