Skip to content

Instantly share code, notes, and snippets.

View zztopper's full-sized avatar

Alexander Spassky zztopper

  • Frankfurt, Germany
View GitHub Profile
@zztopper
zztopper / apt-repo-playbook.yaml
Last active May 20, 2025 12:43 — forked from roib20/apt-repo-playbook.yaml
Example usages of the new `deb822_repository` Ansible module
---
- hosts: localhost
connection: local
gather_facts: true
tasks:
- name: Add APT repositories
when: ansible_os_family == 'Debian'
become: true
block:
@zztopper
zztopper / make-chr.sh
Last active August 31, 2019 03:20 — forked from stroebs/make-chr.sh
Install Mikrotik CHR on generic KVM/VMWare virtual machine
#!/bin/bash
#Setting variables
PARTITION=`mount | grep 'on / type' | cut -d" " -f1`
DISK=${PARTITION::-1}
echo "Disk: $DISK"
ADDRESS=`ip -4 addr show eth0 | grep global | cut -d' ' -f 6 | head -n 1`
echo "IPv4 address: $ADDRESS\n"
GATEWAY=`ip -4 route list | grep default | cut -d' ' -f 3`
echo "IPv4 gateway: $GATEWAY\n"
ADDRESS6=`ip -6 addr show eth0 | grep global | grep inet6 | cut -d' ' -f 6 | head -n 1`