I use UCI together with bash
. In case of other shells the variable and loop syntax might have to be adjusted accordingly.
-
Reference the newly added item with
[-1]
:uci add firewall rule uci set firewall.@rule[-1].name=test
A dump of low level information about the amazing Seagate Exos 7E 8TB 512e/4Kn Fastformat SATA drive (ST8000NM000A) - for all of you tech-savvy NAS builders.
netplan
renderer to NetworkManager
without installing the network-manager
package in the first placenetplan apply
Node Exporter (Linux amd64) is the example here.
Note: you might need to_json|from_json
as a workaround for this issue.
- name: get the latest release details
uri:
url: https://api.github.com/repos/prometheus/node_exporter/releases/latest
I have created this playbook to perform an in-place upgrade of an old MariaDB instance from 5.5.68 to 10.5, sequentially (this is the recommended upgrade path). The playbook works with RHEL7/CentOS7 only and assumes the default installation directories. It doesn't migrate the database settings. It saves the upgrade results locally on the host.
community.mysql.mysql_variables
installed on the controllerOn each run, specify the old version and the new one, e.g.:
The main advantage here is you don't have to add the affected hosts to the Ansible inventory — useful when hosting e.g. an independently managed application. The start time is conveniently converted to an epoch since this is what the Nagios module expects.
- name: schedule nagios downtime
hosts: nagios
gather_facts: no
vars:
Lately I have found myself working a lot with containers with bind mounts and found no elegant way to display all of them in one go.
The command below gives you a nice overview as a json array. You need to have jq
installed.
docker inspect $(docker ps -a -q) | jq '[.[] | {Id: .Id[0:12], Name: .Config.Hostname, Image: .Config.Image, Binds: .HostConfig.Binds}]'