Skip to content

Instantly share code, notes, and snippets.

@yalex2011
yalex2011 / metabase-postgres.docker-compose.yml
Created December 17, 2019 10:58 — forked from eliashussary/metabase-postgres.docker-compose.yml
A docker-compose file for metabase with postgres.
version: "3"
services:
postgres-db:
image: postgres
restart: always
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: postgres
@yalex2011
yalex2011 / gist:0407ab733abc6a7edc8c3043f1cab258
Created September 30, 2019 12:17
list of all containers not running in swarm
docker ps --format '{{ .Names }}' | egrep -v "($(docker service ls --format '{{ .Name }}' | tr $'\n' '|')XXX)"
- set_fact:
result: {}
- name: Get uname -a
raw: uname -a
register: uname
- debug:
var: uname
@yalex2011
yalex2011 / rescan_scsi_bus
Created January 15, 2019 17:40
rescan_scsi_bus ubuntu
#!/bin/bash
for hostdir in /sys/class/scsi_host/host*; do
echo "- - -" > $hostdir/scan
done
@yalex2011
yalex2011 / lxd-fix-privileged
Created December 18, 2018 10:14
lxd root privileged
lxc config set u3 security.privileged true
@yalex2011
yalex2011 / ansible-check-python
Created December 17, 2018 11:53
ansible-check-python
---
- hosts: all
gather_facts: False
become: yes
pre_tasks:
- name: Install python for Ansible
raw: bash -c "test -e /usr/bin/python || (apt -qqy update && apt install -qqy python-minimal)"
register: output
changed_when: output.stdout != ""
#!/usr/bin/env ansible-playbook
- name: Test
hosts: all
serial: 1
order: sorted
gather_facts: no
tasks:
- debug:
@yalex2011
yalex2011 / lxd_set_locales_and_time.md
Last active September 28, 2018 19:11 — forked from petergloor/lxd_set_locales_and_time.md
LXD - set locales and time zone
 lxc exec <container> -- dpkg-reconfigure locales
 lxc exec <container> -- sudo dpkg-reconfigure tzdata
 lxc config set <container> environment.LC_ALL ru_RU.UTF-8
@yalex2011
yalex2011 / vagrantfile
Created September 19, 2018 07:27
Vagrant: libvirt, (Multi-)Multi-Machine and AnsibleCreate
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
# Example vagrant greate multi-box vms
#
# ---- Configuration variables ----
servers=[
@yalex2011
yalex2011 / fix-1c-lib.sh
Last active April 15, 2018 21:21
Запуск 1С 8.3 ubuntu 17.10
sudo mv /opt/1C/v8.3/i386/libstdc++.so.6 /opt/1C/v8.3/i386/libstdc++.so.6.orig
sudo ln -s /usr/lib/i386-linux-gnu/libstdc++.so.6.0.24 /opt/1C/v8.3/i386/libstdc++.so.6