Skip to content

Instantly share code, notes, and snippets.

@ganto
ganto / lxc-post_main.yml
Last active August 29, 2015 14:21
static address lxc template
---
# --------------------------------------------
# Add static hostnames to local /etc/hosts
# --------------------------------------------
- name: Add container names to /etc/hosts
lineinfile:
dest: '/etc/hosts'
regexp: '{{ item.name }}'
@ganto
ganto / sshd.fact
Last active July 30, 2016 20:57
sshd.fact
#!/usr/bin/env python
from re import match
sshd_facts = [
{ 'variable': 'AllowUsers',
'fact': 'allow_users',
'default': [] },
{ 'variable': 'AllowGroups',
'fact': 'allow_groups',
@ganto
ganto / check-lvol.yml
Last active December 5, 2023 06:03
Test playbook for Ansible lvol module
---
# This playbook will check a wide range of code paths of the Ansible lvol module.
#
# Make sure you adjust `test_vg` and `test_pvs` variables according to the test volume group.
#
# Invoke with: ansible-playbook [-K][-v] check-lvol.yml
#
- hosts: localhost
become: True
@ganto
ganto / site-defaults.cfg
Created April 10, 2018 17:10
Mock (v1.4.9) configuration
config_opts['bootstrap_chroot_additional_packages'] = []
config_opts['bootstrap_module_enable'] = []
config_opts['bootstrap_module_install'] = []
config_opts['plugin_conf']['root_cache_enable'] = False
config_opts['plugin_conf']['lvm_root_enable'] = True
config_opts['plugin_conf']['lvm_root_opts'] = {}
config_opts['plugin_conf']['lvm_root_opts']['volume_group'] = 'vg_system'
config_opts['plugin_conf']['lvm_root_opts']['size'] = '2G'
config_opts['plugin_conf']['lvm_root_opts']['umount_root'] = True
@ganto
ganto / golang-centos7.json
Last active August 5, 2018 20:05
OpenShit ImageStream - Golang S2I CentOS
{
"apiVersion": "v1",
"kind": "ImageStream",
"metadata": {
"annotations": {
"openshift.io/display-name": "Go"
},
"name": "golang"
},
"spec": {