Skip to content

Instantly share code, notes, and snippets.

View raphink's full-sized avatar
🐝
eBPF everything!

Raphaël Pinson raphink

🐝
eBPF everything!
View GitHub Profile
resource "jwt_hashed_token" "argocd" {
algorithm = "HS256"
claims_json = jsonencode(
{
iat = 1605854613
iss = "argocd"
jti = "d58253cb-82b9-c58f-5ffd-fea1e8b5afc2"
nbf = 1605854613
sub = "pipeline"
}
Augeas {
lens => 'Xml.lns',
incl => '/home/raphink/bas/puppet/hibernate.cfg.xml',
context => '/files/home/raphink/bas/puppet/hibernate.cfg.xml/hibernate-configuration/session-factory',
}
$settings = [
"set property[#attribute/name='hibernate.connection.driver_class']/#text 'org.postgresql.Driver'",
augeas {
'eth_bond_bond0':
context => '/files/etc/network/interfaces',
changes => [
'defnode bond iface[.="bond0"] ""',
"set \$bond/post-up[1] 'ip route add 10/8 via ${gw} mtu 8900'",
"set \$bond/post-up[2] 'ip route add default via ${gw} mtu 1500'",
'set \$bond/mtu 8900',
'rm \$bond/gateway',
]
require 'puppet'
Puppet.initialize_settings
host = Puppet::SSL::Host.new()
host.generate
sm = Puppet::SSL::StateMachine.new(waitforcert: 10)
sm.ensure_client_certificate
@raphink
raphink / Gemfile.rb
Last active April 23, 2020 11:48
Puppet Lint/Ghostbuster Blog Post
source ENV['GEM_SOURCE'] || "https://rubygems.org"
group :development, :test do
gem 'rake', :require => false
gem 'puppet-lint', :require => false
# Other lint plugins (optional)
gem 'puppet-lint-spaceship_operator_without_tag-check', :require => false
gem 'puppet-lint-unquoted_string-check', :require => false
gem 'puppet-lint-undef_in_function-check', :require => false
@raphink
raphink / provider.tf
Last active April 22, 2020 09:25
Terraform FreeIPA Blog Post
provider freeipa {
host = "ipa.example.test" # or set $FREEIPA_HOST
username = "admin" # or set $FREEIPA_USERNAME
password = "P@S5sw0rd" # or set $FREEIPA_PASSWORD
insecure = true
}
@raphink
raphink / bivac-backup.sh
Last active March 10, 2020 16:27
Bivac blog post
$ bivac backup ssh_config
Backing up `ssh_config'...
ID: ssh_config
Name: ssh_sshconfig
Mountpoint: /etc/ssh
Backup date: 2019-06-13 09:35:38
Backup status: Success
Logs:
testInit
$a = [
{
a => a1,
b => b1,
c => c1,
},
{
a => a2,
b => b2,
c => c2,
=== RUN TestAccRancherCertificateDataSource_foo
--- FAIL: TestAccRancherCertificateDataSource_foo (2.47s)
testing.go:569: Step 0 error: errors during apply:
Error: Bad response statusCode [422]. Status [422 Unprocessable Entity]. Body: [fieldName=name, baseType=error, code=NotUnique] from [http://localhost:8080/v2-beta/projects/1a5/certificates]
on /tmp/tf-test789298738/main.tf line 2:
(source code not available)
=== RUN TestAccRancherCertificateDataSource_foo
panic: test timed out after 5s
goroutine 708 [running]:
testing.(*M).startAlarm.func1()
/usr/local/go/src/testing/testing.go:1334 +0xdf
created by time.goFunc
/usr/local/go/src/time/sleep.go:169 +0x44
goroutine 1 [chan receive]: