Skip to content

Instantly share code, notes, and snippets.

View drybjed's full-sized avatar

Maciej Delmanowski drybjed

View GitHub Profile
List of DebOps things to do in 2015:
✓ add ansible_managed template in debops script
✓ add option to automatically upgrade all packages instead of just security upgrades
✓ new PKI role
- nginx certificate pinning
✓ update gitlab role, remove shasum dependency
- gitlab role, detach mysql/postgresql dependency
- add racktables role or opendcim role
✓ add tls support in mysql
dn: uid=alicej,ou=People,dc=example,dc=net
objectClass: inetOrgPerson
objectClass: authorizedServiceObject
objectClass: nextcloudAccount
objectClass: ldapPublicKey
uid: alicej
cn: Alice Jane
mail: alice@example.net
authorizedService: nextcloud
authorizedService: sshd
##
## Needed attributes for MMC Mail Plugin
##
## Version 02 - 29/11/06
##
## Cédric Delfosse (cdelfosse@mandriva.com)
## Matthieu Vogelweith (mvogelweith@mandriva.com)
##
# Attributes
@drybjed
drybjed / process_postfix_queue.py
Created October 26, 2018 10:50 — forked from suenkler/process_postfix_queue.py
This Python script checks Postfix's mail queue for messages that were deferred for a defined reason, deletes these mails and notifies the sender.
# -*- coding: utf-8 -*-
"""
This Python script checks Postfix's mail queue for messages that
were deferred for a defined reason, deletes these mails and
notifies the sender.
This script uses Python 3 and is tested on Ubuntu 14.04.
Copyright (C) 2016 Hendrik Sünkler <mailbox@suenkler.info>
@drybjed
drybjed / words.md
Created November 15, 2016 09:37 — forked from fogleman/words.md
Mnemonic Encoding Word List

Mnemonic Encoding Word List

http://web.archive.org/web/20090918202746/http://tothink.com/mnemonic/wordlist.html

  • The wordlist contains 1626 words.
  • All words are between 4 and 7 letters long.
  • No word in the list is a prefix of another word (e.g. visit, visitor).
  • Five letter prefixes of words are sufficient to be unique.
  • The words should be usable by people all over the world. The list is far from perfect in that respect. It is heavily biased towards western culture and English in particular. The international vocabulary is simply not big enough. One can argue that even words like "hotel" or "radio" are not truly international. You will find many English words in the list but I have tried to limit them to words that are part of a beginner's vocabulary or words that have close relatives in other european languages. In some cases a word has a different meaning in another language or is pronounced very differently but for the purpose of the encoding it is still ok - I assume that when the encoding is
@drybjed
drybjed / lxc-setup.sh
Created October 27, 2015 22:23 — forked from tostiheld/lxc-setup.sh
lxc-setup-debian-8.2
#!/bin/bash
# additions to flockport install script to make lxc run more smoothly
# on debian jessie 8.2
# tostiheld 2015
LXC_USER=lxcuser
LXC_PATH=/home/$LXC_USER/.config/lxc
LXC_CONF=$LXC_PATH/default.conf
# files/env:
Defaults env_keep += "SSH_AUTH_SOCK"
# tasks/main.yml
- name: ensure sudo keeps SSH_AUTH_SOCK in environment
copy: src=env
dest=/etc/sudoers.d/env
mode=0440
owner=root
group=root
@drybjed
drybjed / gpg-pam-exec
Created November 19, 2013 20:57 — forked from Apsu/gpg-pam-exec
#!/usr/bin/env bash
# grab PAM-provided auth token
read token
# grab our user, $USER isn't always set
USER="$(id -un)"
# switch to PAM_USER if passed, buffer return value
$([[ "$PAM_USER" != "$USER" ]] && echo su - "$PAM_USER" -s) /usr/local/bin/gpg-preset-passphrase <<< "$token"
@drybjed
drybjed / cfssl_certificate.py
Created November 24, 2015 18:02 — forked from ianunruh/cfssl_certificate.py
Ansible module for generating SSL certs from cfssl
#!/usr/bin/env python
import json
import os
import requests
def main():
module = AnsibleModule(
argument_spec=dict(
cert_path=dict(required=True),
@drybjed
drybjed / lookup.j2
Last active August 29, 2015 14:24 — forked from halberom/lookup.j2
{% for host in groups['gluster_servers'] %}
{% if host != inventory_hostname %}
{% if 'ansible_' + rhel7_interface in hostvars[host] %}
- {{ hostvars[host]['ansible_' + rhel7_interface]['ipv4']['address'] }}
{% else %}
- {{ hostvars[host]['ansible_' + default_interface]['ipv4']['address'] }}
{% endif %}
{% endif %}
{% endfor %}