Skip to content

Instantly share code, notes, and snippets.

View hvanderlaan's full-sized avatar

Harald van der Laan hvanderlaan

View GitHub Profile

Keybase proof

I hereby claim:

  • I am hvanderlaan on github.
  • I am hvanderlaan (https://keybase.io/hvanderlaan) on keybase.
  • I have a public key whose fingerprint is 5A66 968F 59C5 388A A2DC 9410 0C93 BBBE CA38 9531

To claim this, I am signing this object:

@hvanderlaan
hvanderlaan / lx branded zone zimbra.md
Last active August 29, 2015 14:18
LX branded Ubuntu Zimbra 8.6.0GA install

Requirements

- ubuntu 14.04 LX branded zone
- 4GB Memory

Installing Zimbra 8.6.0GA on a LX branded Ubuntu zone

zlogin <zone id>

cd /var/tmp

#!/bin/bash
# deploy-pxe-server.sh: This script will setup a pxe boot / install server
# it will install all required packages and will place or alter the
# configurations files if needed.
#
# Author : Harald van der Laan
# Version: v0.1
# Date : 15/apr/2015
@hvanderlaan
hvanderlaan / deploy-lxc-alpine.sh
Last active January 12, 2021 12:50
lxc deploy alpine linux ansible ready
#!/bin/bash
# file : deploy-lxc-alpine.sh
# purpose: deploy a new alpine container that is ready for ansible management
#
# author : harald van der laan
# date : 2016/04/19
# version: v1.0
lxcName=${1}
@hvanderlaan
hvanderlaan / create-lxc-alpine-ansible-node.sh
Created April 19, 2016 13:26
create ansible alpine linux container
#!/bin/bash
# file : create-lxc-alpine-ansible-node.sh
# purpose: deploy a new alpine container that is the ansible server
#
# author : harald van der laan
# date : 2016/04/19
# version: v1.0
lxcName="ansible01"
@hvanderlaan
hvanderlaan / wp in lxc.md
Last active January 4, 2017 06:22
wp in lxc
user@host ~ $ lxc launch ubutnu wp-server
user@host ~ $ lxc exec wp-server -- bash
root@wp-server ~ # apt-get update
root@wp-server ~ # apt-get --yes dist-upgrade
root@wp-server ~ # apt-get --yes install wget apache2 libapache2-mod-php7.0 mysql-server php7.0-mysql
root@wp-server ~ # msyql -u root -p
@hvanderlaan
hvanderlaan / ansible-rundeck.md
Last active August 2, 2021 20:43
ansible - rundeck, the poorman's ansible tower

Poor man's Ansible Tower

After a while of messing around with the free / demo version of Ansible Tower I thought that this could also be done with free tools. With some help from the internet and as an IT consultant I found the way forward.

As we all known Ansible is for free and is a package in the Ubuntu repository. Ansible Tower is a frontend for Ansible that will provide scheduler and a fancy webfrontend.

Rundeck is a job scheduler and runbook administration that is for free and also has a fancy webfrontend.

So for the poor man's solution we are going to use the best of both worlds.

POC

@hvanderlaan
hvanderlaan / ansible-vault.md
Last active August 31, 2021 12:57
Ansible-vault example

Ansible vault example

New in Ansible 1.5, “Vault” is a feature of ansible that allows keeping sensitive data such as passwords or keys in encrypted files, rather than as plaintext in your playbooks or roles. These vault files can then be distributed or placed in source control. To enable this feature, a command line tool, ansible-vault is used to edit files, and a command line flag –ask-vault-pass or –vault-password-file is used. Alternately, you may specify the location of a password file or command Ansible to always prompt for the password in your ansible.cfg file. These options require no command line flag usage.

Requirements

@hvanderlaan
hvanderlaan / nagiosTelegram.py
Last active November 30, 2021 11:34
Nagios notifications via Telegrambot
#!/usr/bin/env python
# file : nagiosTelegram.py
# purpose : send nagion notifications via Telegram bot
#
# author : harald van der laan
# date : 2017/04/01
# version : v1.0.1
#
# changelog:
@hvanderlaan
hvanderlaan / smartlight.cfg
Last active September 2, 2017 16:05
getting Ikea tardfri lightbulb status
[tardfri]
hubip = x.x.x.x
securityid = AABBCCDDEEFFGGHH