This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.
Step 1 - Enable NBD on the Host
modprobe nbd max_part=8
sudo su
apt-get update && apt-get install -y libvirt-dev ruby-all-dev apparmor-utils
curl -O -L https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.5_x86_64.deb
dpkg -i vagrant_1.6.5_x86_64.deb
aa-complain /usr/lib/libvirt/virt-aa-helper # workaround
exit
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # All Vagrant configuration is done below. The "2" in Vagrant.configure | |
| # configures the configuration version (we support older styles for | |
| # backwards compatibility). Please don't change it unless you know what | |
| # you're doing. | |
| Vagrant.configure("2") do |config| | |
| # The most common configuration options are documented and commented below. | |
| # For a complete reference, please see the online documentation at |
| --- | |
| # tasks file for ansible-role-mikrotik-ipsec | |
| - name: Check RouterOS version. | |
| raw: ":local varif [/system package update get installed-version]; :put \"$varif\"" | |
| args: { executable: False } | |
| register: installed_version | |
| changed_when: False | |
| - name: Set custom fact for RouterOS version. |
| export LANGUAGE=en_US.UTF-8 | |
| export LANG=en_US.UTF-8 | |
| export LC_ALL=en_US.UTF-8 | |
| locale-gen en_US.UTF-8 | |
| locale-gen ru_RU.UTF-8 | |
| dpkg-reconfigure locales |
| qmk json2c2 C:/Users/[USERSAME]/qmk_firmware/keyboards/JNAO/keymaps/JoeNAO/keymap.json | |
| qmk c2json -km joeyv120 -kb keebio/iris/rev4 C:/Users/[USERSAME]/qmk_firmware/keyboards/keebio/iris/keymaps/joeyv120/keymap.c | |
| qmk c2json -km JoeNAO -kb jnao C:/Users/[USERSAME]/qmk_firmware/keyboards/JNAO/keymaps/JoeNAO/keymap.c --no-cpp |
This is an example script for implementing dynamic inventory in Ansible. It could have been written in bash, but python is much easier to read.
$HOME/test_inventroy.pychmod +x $HOME/test_inventroy.pystore to your needs.| blueprint: | |
| name: 1 Rus Включение и выключение света, выключателя, объекта или сцены с помощью условий запуска | |
| description: > | |
| # Включение и выключение света, выключателя, объекта или сцены с помощью условий запуска | |
| **Version: 1.7** | |
| Наиболее распространенная автоматика, используемая для включения и выключения источника света, выключателя, объекта или сцены с помощью двоичного датчика, высоты солнца, значения освещенности окружающей среды или времени, когда их значение изменяет состояние или превышает заданное значение. | |
| Перевел и подмял под своё усмотрение |