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 networkd( | |
Hash $bonds = {}, | |
Optional[Hash] $networks = undef, | |
Hash $units = {}, | |
) | |
{ | |
package { | |
# Ubuntu | |
'netplan.io': ensure => absent; | |
# RHEL |
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 a { | |
file { ['/a', '/b']: } | |
file{"/xx": ensure => absent, require => File['/a'] } | |
} | |
class b inherits a { | |
File["/xx"]{ require +> File['/b']} | |
} | |
include b |
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
Facter.add(:fqdndns_ipaddress4) do | |
setcode do | |
begin | |
# Use the system configured nameservers to run a query | |
addrs = [] | |
begin | |
require 'resolv' | |
Resolv::DNS.open do |dns| | |
ress = dns.getresources(Facter.value('fqdn'), Resolv::DNS::Resource::IN::A) | |
addrs = ress.map { |r| r.address } |
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 | |
case $1 in | |
-c) | |
card=$2; shift; shift;; | |
*) | |
card=$(awk '/digital audio playback/ {c = substr($0, 7, 2)} END {print c}' /proc/asound/devices) | |
;; | |
esac |
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
# Common configuration | |
exclude_paths = [ | |
'pkg/**/*', | |
'vendor/**/*', | |
'spec/fixtures/modules/**/*', | |
'modules/**/*', | |
] | |
# Configuration for 'rake lint'. See documentation at | |
# https://github.com/rodjek/puppet-lint |
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/perl -CSDL | |
use warnings; | |
use strict; | |
use utf8; | |
use JSON; | |
# Don't die when instant update is requested with a sloppy | |
# pkill -USR1 i3status | |
$SIG{USR1} = undef; |
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 | |
# | |
# i3-disp-size | |
# Displays the focused container's dimensions in that container's corner. | |
# | |
# Written by GermainZ and kjetilho from #i3@freenode | |
# | |
# Dependencies: | |
# | |
# - i3 <https://i3wm.org/> |
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/perl | |
# | |
# puppetdb 1.0 - a wrapper to simplify lookups in PuppetDB. | |
# Written 2018 by [email protected] | |
use Getopt::Long; | |
use LWP::UserAgent; | |
use URI::Escape; | |
use JSON; | |
use strict; |
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
ARG BASE_IMAGE=buster | |
FROM debian:$BASE_IMAGE | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN mkdir -p /run/systemd && \ | |
echo 'docker' > /run/systemd/container | |
CMD ["/bin/bash"] |
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 | |
declare -A pvalue | |
parse_plist() { | |
declare -a pl=$1 | |
pvalue=() | |
local i=0 | |
while [[ i -lt ${#pl[@]} ]] | |
do |
NewerOlder