Skip to content

Instantly share code, notes, and snippets.

View magne's full-sized avatar

Magne Rasmussen magne

  • Tromsø, Norway
View GitHub Profile
@magne
magne / setup-lxd-profile.sh
Last active February 19, 2019 14:12
This will create a LXC profile that will mount the user's home directory in the container.
#!/bin/bash
set -eu
_UID=$(id -u)
GID=$(id -g)
# give lxd permission to map your user/group id through
grep root:$_UID:1 /etc/subuid -qs || sudo usermod --add-subuids ${_UID}-${_UID} --add-subgids ${GID}-${GID} root
# set up a separate key to make sure we can log in automatically via ssh
# with $HOME mounted
@magne
magne / group_vars_all.yml
Created August 27, 2018 21:21
Jinja2: nested for loop where inner loop is determined by outer
haproxy_listener:
- name: api
port: 6443
group: kube-master
- name: http
port: 80
group: kube-master
- name: https