Ansible setup for VPN using WireGuard

Setting up WireGuard is not a difficult process but I wanted to automate it among hosts by using a simple playbook that can be executed against the hosts and get it configured and deployed in a simple way. I also wanted to require the minimum possible number of values in the inventory, so tried to automate lot of the information required, leaving in the end only some required values: wireguard: True wgrole: 'master' or 'something else' wgport: port number to use The first step was to create the private and public key once the wireguard package is installed. ...

March 17, 2022 · 5 min · Pablo Iranzo Gómez

LDAP query from Python

Recently, some colleagues commented about validating if users in a Telegram group were or not employees anymore, so that the process could be automated without having to chase down the users that left the company. One of the fields that can be configured by each user, is the link to other platforms (Github, LinkedIn, Twitter, Telegram, etc), so querying an LDAP server could suffice to get the list of users. ...

October 19, 2021 · 2 min · Pablo Iranzo Gómez

How to stake on NYM Validator 🐳🐳🐳

As said in the article about mixnodes and validators, NYM is a technology aiming for providing privacy for the communications. Once you get some tokens, PUNK at this time, you can use the web wallet to check the balance of your account and delegate it to mixnodes or gateways… but, using the binaries, you can additionally delegate to validators. For doing this, we first need the nymd binary on our system to follow the procedure for compiling it from the documentation for validators, but skip the remaining parts https://nymtech.net/docs/run-nym-nodes/validators/. ...

September 28, 2021 · 3 min · Pablo Iranzo Gómez

Geo replication with syncthing

Some years ago I started using geo replication to keep a copy of all the pictures, docs, etc After being using BitTorrent sync and later resilio sync (even if I didn’t fully liked the idea of it being not open source), I gave up. My NAS with 16 GB of ram, even if a bit older (HP N54L), seemed not to have enough memory to run it, and was constantly swapping. ...

June 12, 2021 · 3 min · Pablo Iranzo Gómez

How to check if a system is virtual

I was improving a playbook in Ansible and wanted to find a way to find if a system was virtual or not to decide about some tunning like setting tuned-adm profile virtual-guest or disable the power off when the lid is closed. After some research and try-except situations I got to this one that seemed to work (I had to tune it as one desktop machine was missing the /sys entry I was using before): ...

May 10, 2021 · 3 min · Pablo Iranzo Gómez
This blog is a participant in the Amazon Associate Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.