Skip to content

Instantly share code, notes, and snippets.

View logicminds's full-sized avatar

Corey Osman logicminds

View GitHub Profile
https://57943b70dd3554c128ba686b5f21dc2a.loophole.site
@logicminds
logicminds / version_matrix.yaml
Last active November 15, 2023 18:18
Linkerd Helm version matrix
---
stable-2.10.2:
linkerd:
chart_name: linkerd2
chart_version: 2.10.2
linkerd-multicluster:
chart_name: linkerd-multicluster
chart_version: 2.10.2
linkerd-viz:
chart_name: linkerd-viz
@logicminds
logicminds / codename_hack.pp
Created March 11, 2021 15:53
Ubuntu distro flavor hack
if $::lsbdistid == 'MMP' {
# This is a hack to get around a facter 3,4 bug
# where the codename is not read correctly
if $::lsbdistcodename == 'pisces' {
ini_setting{'DISTRIB_CODENAME':
ensure => present,
path => '/etc/lsb-release',
value => 'bionic',
setting => 'DISTRIB_CODENAME',
}
@logicminds
logicminds / azure-pipelines.yml
Created October 21, 2020 14:39
azure-pipelines.yml for puppet
# Ruby
# Package your Ruby project.
# Add steps that install rails, analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/ruby
trigger:
- testing
- prduction
pool:
$hashdata = {
"product_teams" => [
{
"name"=> "iphone",
"token"=> "apple"
},
{
"name"=> "xbox",
"token"=> "grapes"
}
@logicminds
logicminds / sysinfo.rb
Created September 24, 2020 19:11
Revamped sysinfo gem
# frozen_string_literal: true
require 'socket'
require 'time'
require 'tmpdir'
require 'json'
# = SysInfo
#
# A container for the platform specific system information.
@logicminds
logicminds / sensitive_test_unwrap.pp
Last active May 7, 2020 16:59
Puppet Sensitive datatype wrapped in a hash
class test(Hash $config){
file{'/tmp/test123.txt':
ensure => file,
content => Sensitive($config.to_yaml),
}
}
$jwt_token = Sensitive.new('doublesecret')
$config = {
general => {
@logicminds
logicminds / sensitive_test.pp
Created May 6, 2020 22:45
puppet sensitive datatype working example
class test(Sensitive $var1){
file{'/tmp/test123.txt':
ensure => file,
content => $var1,
}
}
class{'test': var1 => Sensitive.new('doublesecret') }
@logicminds
logicminds / 2fa_proxy.rb
Created December 12, 2019 16:11
WIP: script to create a 2FA proxy for bulk ssh connections with ease
#!/usr/bin/env ruby
require 'bolt'
require 'pry'
require 'bolt/config'
require 'bolt/inventory'
require 'bolt/logger'
require "tty-prompt"
prompt = TTY::Prompt.new
@logicminds
logicminds / gist:0175afde8cac01ac89a26c7ba1aa385c
Created November 21, 2019 22:31
kitchen-docker config for systemd
---
# allows docker containers to run systemd for traditional CM acceptance testing.
# Note obviously systemd must be installed in the container
# this also is for unprivileged mode
# Requires a operating systemd installed RHEL7, CENTOS7, ... that supports systemd.
# https://developers.redhat.com/blog/2016/09/13/running-systemd-in-a-non-privileged-container/
driver:
name: docker
run_options: