Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
  • Programming
  • Databases
  • Multimedia
  • Windows

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Incus
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid

Debian / Ubuntu mass dist-upgrade with Ansible (with fallback and logging)

ansible-playbook dist-upgrade.yml -i your_inventory [-l host_name]

[embed_url: https://raw.githubusercontent.com/panticz/ansible/master/dist-upgrade.yml]

Sonoff Basic / ITEAD ESP8266

Flash ESPEasy with a FTDI adapter

pip3 install tasmotizer
chmod 777  /dev/ttyUSB0 
tasmotizer.py
Release 12.5.0
tasmota.bin
Tasmotizue!

Connect to temporary WiFi access point

SSID: ESP_0
pass: configesp

Configure connect to your WiFi access point

http://192.168.4.1/

Commands
# remove serial connector

# on
http://192.168.178.10/tools?cmd=gpio,12,1

# off
http://192.168.178.10/tools?cmd=gpio,12,0

Fix
Hidden rules page
http://192.168.178.10/rules

Debug

screen /dev/ttyUSB0 115200

Integrate to HomeAssistant
https://automation.baldacchino.net/flashing-tasmota-on-a-sonoff-basic-r4-connecting-to-home-assistant/

# configuration.yaml
switch:                         
  - platform: mqtt            
    unique_id: sonoff_poweroutlet
    name : "SonOff"           
    state_topic: "stat/device_name/POWER"
    command_topic: "cmnd/device_name/POWER"
    value_template: "{{ value_json.STATE }}"
    payload_on: "ON"          
    payload_off: "OFF"        
    state_on: "ON"            
    state_off: "OFF"          
    qos: 2

Links
https://rutg3r.com/sonoff-firmware-tutorial-to-esp-easy/
https://wiki.fhem.de/w/index.php?title=Sonoff
https://wiki.fhem.de/wiki/Sonoff#Produkt.C3.BCbersichtsliste_sonoff
https://github.com/espressif/esptool
https://waschto.eu/easyesp
https://www.letscontrolit.com
https://github.com/arendst/Sonoff-MQTT-OTA
https://forum.fhem.de/index.php/topic,55036.90.html
http://captain-slow.dk/2016/05/22/replacing-the-itead-sonoff-firmware/
https://github.com/tasmota/tasmotizer

ZFS filesystem on Linux

Create ZFS filesystem

apt install -y zfsutils-linux
zpool create tank /dev/system/lxd 
zfs create -o mountpoint=/var/lib/lxd2 tank/lxd

Boot Ubuntu LiveCD

terminal
sudo apt-get install -y ssh
sudo passwd ubuntu
ip a

Mount all datasets

zfs mount -a

ZFS on Ubuntu 23.04
https://github.com/Sithuk/ubuntu-server-zfsbootmenu

SSH login to Ubuntu LiveCD

webix

Download Webix GPL
https://webix.com/packages/webix.zip
https://webix.com/get-webix-gpl/

Update Webix

cd /var/www/html
mkdir /tmp/OLD
mv backend codebase samples sources *.json *.js *.txt /tmp/OLD
wget https://webix.com/packages/webix.zip
unzip webix.zip
rm webix.zip

Tutorials
https://webix.com/tutorials/
https://docs.webix.com/samples/
https://webix.com/tutorials/intro/

Datatable

# reload from external source
datatable1.clearAll();
datatable1.load(grida.config.url);

# focus select in datatable filter
ready:function(){
    this.getFilter("value").focus();
}

# multi colum sort
sort:"multi"
multiselect: true
clipboard:"selection"

Webix Remote
http://docs.webix.com/desktop__webix_remote_php.html - Webix Remote with PHP

# pass paramter to remote funtion
var result = webix.remote.function1(foo, bar);

# show return value from remote function as webix message
var result = webix.remote.MyClass.select(val1); 
result.then((data) => webix.message("msg:" + data));

send data

# post
webix.ajax().post("post.php", {foo:bar});

Webix Jet
https://webix.gitbooks.io/webix-jet/content/chapter1.html

Snipets / Dev
https://webix.com/snippet/

# get value from table filter field
var sku = $$("table").getFilter("SKU").value;

Icons
https://materialdesignicons.com/
https://snippet.webix.com/honyfqgt

Links
https://dhtmlx.com/
https://docs.webix.com/desktop__whats_new_5_3.html - changelog

Grub

ip l add link enp24s0f0np0 name dev3633 type vlan id 3633
ip l set dev dev3633 up
dhclient dev3633 

apt update
apt install mdadm
mdadm --assemble --scan

mount /dev/mapper/system-root /mnt/

mount --bind /dev/ /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys

chroot /mnt
mount -a

#modprobe nvram

update-grub

Fix "failed to connect to lvmetad"
https://askubuntu.com/questions/745218/ubuntu-wont-boot-because-of-lvmetad

vi /etc/lvm/lvm.conf
use_lvmetad = 0

Links
https://wiki.gentoo.org/wiki/GRUB2/Chainloading
https://wiki.ubuntuusers.de/GRUB/GRUB-Shell/
https://wiki.archlinux.org/index.php/GRUB/Tips_and_tricks#Alternative_installation_methods

DRBD

# cat /etc/drbd.d/global_common.conf 
global {
		usage-count	yes;
}

common {
	startup {
		degr-wfc-timeout	0;
	}

	net {
		cram-hmac-alg	sha1;
		shared-secret	****************;
	}

	disk {
		on-io-error	detach;
	}
}

# cat /etc/drbd.d/r0.res 
resource r0 {
	on scld.sedo.de.intern {
		volume 0 {
			device		/dev/drbd0;
			disk		/dev/vg0/lvol0;
			flexible-meta-disk	internal;
		}
		address		192.168.255.1:7788;
	}
	on ubuntu {
		volume 0 {
			device		/dev/drbd0;
			disk		/dev/sda3;
			flexible-meta-disk	internal;
		}
		address		192.168.255.2:7788;
	}
}
drbdadm disk-options --c-plan-ahead=0 --resync-rate=900M --c-fill-target=0 r0

# status
drbd-overview

# get resources
cat /etc/drbd.d/db.res | grep resource | cut -d" " -f2

# resolve split brain
dmesg | grep -i "split-brain" 

# on slave (split brain victim)
drbdadm secondary db1
drbdadm connect --discard-my-data  db

# on master
drbdadm connect db

Links
https://docs.linbit.com/doc/users-guide-84/s-resolve-split-brain/
https://wiki.ubuntuusers.de/DRBD/

dnsmasq

# cat /etc/dnsmasq.conf
dhcp-authoritative
server=192.168.1.6

log-facility=/var/log/dnsmasq.log
log-queries

local=/example.com/
domain=example.com

# cat /etc/dnsmasq.conf | grep "^dhcp-host" | awk -v OFS="\t" -F "," '{print $3, $2}' | sort  -k2 > /etc/hosts.pre
addn-hosts=/etc/hosts.pre

# DHCP
dhcp-range=192.168.1.150,192.168.1.200,255.255.255.0,1d
dhcp-option=option:router,192.168.1.6
dhcp-option=option:ntp-server,217.7.239.199

# DNS
dhcp-option=option:dns-server,1.1.1.1,8.8.8.8

# PXE
dhcp-boot=undionly.kpxe,srv,192.168.1.9
dhcp-boot=net:sip,http://srv/snom3x0/snom3x0.xml,srv,192.168.1.9
dhcp-boot=net:ts,ltsp/amd64/pxelinux.0,ts,192.168.1.159

# Clients
dhcp-host=00:00:00:00:00:03,www,192.168.1.3
dhcp-host=00:00:00:00:01:70,mx,192.168.1.170

# LTSP
dhcp-host=00:01:02:03:04:11,workstation1,192.168.1.79,net:ts
dhcp-host=00:01:02:03:04:22,workstation2,192.168.1.80,net:ts

gogs

Gogs (deprected)
# Ansible role
https://github.com/panticz/ansible/tree/master/roles/gogs

Installation instructions
https://packager.io/gh/pkgr/gogs/install?bid=562#ubuntu-16-04-gogs
https://packager.io/gh/pkgr/gogs/install?bid=440

Backup

# backup
su git
cd
/opt/gogs/gogs backup

Links
https://docs.gitea.io/en-us/install-with-docker/

Mate

# install
sudo apt-get install ubuntu-mate-desktop
# reset panel

mate-panel --reset

# configuration

https://github.com/vinadoros/CustomScripts/blob/master/DMATE.sh

gsettings set org.mate.caja.preferences default-folder-viewer 'list-view'

# Caja bookmarks

~/.gtk-bookmarks

Ansible templates

{% for host in groups['db_servers'] %}
   {{ host }}
   {{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}
{% endfor %}

{% elif  student.department.upper() != "MATHS DEPARTMENT" %}
    Maths department
{% endif %}

# generate SSH config
{% for host in groups['vm.example.com'] %}
Host {{ host }}
  Hostname {{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}
{% endfor %}

{% for host in groups['all'] %}
  "{{ host }}"{% if not loop.last %},{% endif %}
{% endfor %}

# value by group (condition)
{% if 'www' in group_names and ansible_fqdn in groups['www'] %}
foo=true
{% else %}
foo=false
{% endif %}

{% if 'index.html' in request.build_absolute_uri %}
    hello
{% else %}
    bye
{% endif %}

{% if grains['os'] == 'Fedora' -%}
mailq_path = /usr/bin/mailq.postfix
{% elif grains['os'] == 'Arch' -%}
mailq_path = /usr/bin/mailq
{-% endif %}

{% if os_env == "stage" and 'control-node' in inventory_hostname %}
    storage-extern:
      id: 1234
{% endif %}

{% if ( (foo == 'foo' or bar == 'bar') and (fooo == 'fooo' or baar == 'baar') ) %}
 ...
{% endif %}
{% set keystone_cmd = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %}
{% set keystone_dir = 'apache2/conf-enabled' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd/conf.d' %}
{
    "command": "/usr/sbin/{{ keystone_cmd }}",

Links
http://jinja.pocoo.org/docs/dev/templates/#line-statements

Pagination

  • First page
  • Previous page
  • …
  • Page 21
  • Page 22
  • Page 23
  • Page 24
  • Page 25
  • Page 26
  • Page 27
  • Page 28
  • Page 29
  • …
  • Next page
  • Last page
Profiles GitHub StackOverflow LinkedIn Xing
Contact Imprint
© panticz 2026

Cookie-Einstellungen

Diese Website nutzt eingebettete Inhalte von Drittanbietern (z.B. YouTube, SoundCloud). Beim Laden dieser Inhalte werden Daten an die jeweiligen Anbieter übermittelt. Datenverarbeitungserklärung