Skip to content

Instantly share code, notes, and snippets.

@vinzent
vinzent / rn-pva1.sh
Created August 30, 2016 20:09
ein paar neutron/nova commands
neutron net-create --port_security_enabled=False --router:external=False NetA
neutron subnet-create --name NetA_Sub1 --no-gateway --disable-dhcp NetA 192.168.0.0/24
neutron net-create --port_security_enabled=False --router:external=False NetB
neutron subnet-create --name NetB_Sub1 --no-gateway --disable-dhcp NetB 192.168.1.0/24
neutron net-create --port_security_enabled=False --router:external=False NetC
neutron subnet-create --name NetC_Sub1 --no-gateway --disable-dhcp NetC 192.168.2.0/24
neutron net-create --port_security_enabled=False --router:external=False NetD
@vinzent
vinzent / gist:ec269970142a723bd6a184707ade66b2
Created August 20, 2016 06:24
SELinux Java App system service type transition
Am 19.08.2016 um 17:53 schrieb Dominick Grift:
> On 08/19/2016 03:54 PM, Fakim, Walid wrote:
>> The init script launches a shell script which further down calls java - so will init_daemon_domain suffice? It's similar to a tomcat startup script.
>>
>>
>
@vinzent
vinzent / output
Created June 22, 2016 18:20
puppet defined test with strict_variables
$ /opt/puppetlabs/bin/puppet apply --strict_variables /tmp/test.pp
Error: Evaluation Error: Error while evaluating a Function Call, 'defined' parameter 'vals' expects a value of type String or Type, got Integer at /tmp/test.pp:4:5 on node tmueller-notebook.local
@vinzent
vinzent / openvpn_allow_all_ports.te
Created June 20, 2016 08:42
openvpn allow all ports
policy_module(openvpn_allow_all_ports, 0.1.0)
gen_require(`
attribute port_type;
type openvpn_t;
')
allow openvpn_t port_type:tcp_socket { name_bind };
@vinzent
vinzent / rundeck.pp
Created June 18, 2016 13:14
Rundeck EL7 demo-install
# Simple demo-install of rundeck on EL7 (CentOS, RHEL)
#
# Pre-requisites:
# - Installed modules
# puppet module install puppetlabs-java
# puppet module install puppet-rundeck
# puppet module install crayfishx-firewalld
# - $::fqdn fact needs to be working
#
# Install: puppet apply rundeck.pp
#!/bin/bash
########################################
# create the first spacewalk account
# satwho requires it
LANG=C
tempfile=$(mktemp /tmp/$(basename $0).XXXXXX)
@vinzent
vinzent / nvidia_driver_install.pp
Last active January 22, 2016 09:12
Referencing hash values within module
# https://groups.google.com/forum/#!topic/puppet-users/1ol4b1euTiE
class nvidia::driver_install (
include stdlib
$model_hash = {
009d => "$::nvidia::params::quadro_fx_4500_driver",
06dc => "$::nvidia::params::quadro_6000_driver",
06d9 => "$::nvidia::params::quadro_5000_driver",
11ba => "$::nvidia::params::quadro_K5000_driver",
17c2 => "$::nvidia::params::gtx_titanx_driver",
@vinzent
vinzent / test_spec.rb
Last active September 21, 2015 07:38
# all checks will "fail", but check date output
#
# fails with: rspec test_spec.rb </dev/null
# works with: rspec test_spec.rb
require 'serverspec'
set :backend, :exec
describe 'test' do
@vinzent
vinzent / puppetserver-create-gem-rpm
Created June 10, 2015 09:14
puppetserver-create-gem-rpm
#!/bin/bash
# Author: Thomas Mueller <[email protected]>
# Date: 2015-06-10
# enable to exit on first error
# set -e
# list gem's to create rpm's seperated by space
# example for 2 gems: gem_list="r10k trocla"
@vinzent
vinzent / puppet-agent-create-gem-rpm
Created June 5, 2015 07:18
Howto: easily create rpms from ruby gems for use with puppet-agent AIO
#!/bin/bash
# Author: Thomas Mueller <[email protected]>
# Date: 2015-06-05
# enable to exit on first error
# set -e
# list gem's to create rpm's seperated by space
# example for 2 gems: gem_list="r10k trocla"