This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pe_puppet_authorization::rule { 'allow-ca-client-delete-self': | |
match_request_path => '/puppet-ca/v1/certificate_status/([^/]+)$', | |
match_request_type => 'regex', | |
match_request_method => ['delete'], | |
allow => '$1', | |
sort_order => 500, | |
path => "/etc/puppetlabs/puppetserver/conf.d/auth.conf", | |
notify => Service['pe-puppetserver'], | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$bottles = Integer[0,99].map |$bottle| { abs($bottle - 99) } | |
$report = { | |
bottles => '%s bottle%s of beer on the wall, %s bottle%s of beer.', | |
left => '%s bottle%s of beer on the wall.', | |
take => 'Take one down and pass it around', | |
buy => 'Go to the store and buy some more', | |
} | |
$bottles.map |$bottles_on_wall| { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class homebrew ( | |
Array[String] $packages = ['procps-ng', 'curl', 'file', 'git'], | |
) { | |
yum::group { 'Development Tools': | |
ensure => present, | |
} | |
-> package { $packages: | |
ensure => present | |
} | |
-> user { 'linuxbrew': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# halt on any errors | |
set -o pipefail -e | |
BREW_INSTALL_PATH=/home/linuxbrew/.linuxbrew | |
if ! [ -x "/home/linuxbrew/.linuxbrew/bin/brew" ] ; then | |
if ! sudo -l -U root >/dev/null 2>&1 ; then | |
echo "root sudo permission required to install" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/conf.d/rtc-i2c | |
# | |
# My chip is actually a ds3231n, but ds1307 driver works fine (ds3232 does not!) | |
# | |
CHIP="ds1307" | |
ADDRESS="0x68" | |
BUS="1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
tasks: | |
- name: "yum: upgrade packages" | |
yum: | |
name: '*' | |
state: latest | |
update_cache: yes | |
update_only: yes | |
register: yum_update_status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
from datetime import timedelta | |
from datetime import datetime | |
import os | |
import re | |
import sys | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Based on https://gist.github.com/matthiassb/9c8162d2564777a70e3ae3cbee7d2e95 | |
PATH=/sbin:/bin | |
WINSYS32=/mnt/c/Windows/System32 | |
PS=$WINSYS32/WindowsPowerShell/v1.0/powershell.exe | |
CHCP=$WINSYS32/chcp.com | |
PIDFILE=/var/run/dns-sync.pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__WINSYS32=/mnt/c/Windows/system32 | |
__POWERSHELL=${__WINSYS32}/WindowsPowerShell/v1.0/powershell.exe | |
powershell() { | |
if [ -z "${__OEMCP}" ] ; then | |
__OEMCP=$(${__WINSYS32}/reg.exe query "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Nls\\CodePage" /v OEMCP 2>&1 | sed -n 3p | tr -d '\015' | grep -o '[[:digit:]]*') | |
fi | |
$__WINSYS32/chcp.com $__OEMCP >/dev/null | |
$__POWERSHELL "$@" | tr -d '\015' | |
$__WINSYS32/chcp.com 65001 >/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%if 0%{?fedora} > 17 || 0%{?rhel} > 6 | |
%global systemd_support 1 | |
%else | |
%global systemd_support 0 | |
%endif | |
Summary: A modern replacement for NSCA | |
Name: nsca-ng | |
Version: 1.6 | |
Release: 1%{?dist} |