Skip to content

Instantly share code, notes, and snippets.

View WhatsARanjit's full-sized avatar

Ranjit Viswakumar WhatsARanjit

View GitHub Profile
@kawsark
kawsark / vault-agent-pki
Last active December 20, 2023 12:50
Vault Agent with PKI certificate rendering
### Configure variables
These variables will be used for this snippet. Please substitute accordingly.
```bash
export RootCAName="root_ca"
export InterCAName="inter_ca"
export CommonName="hashidemos.io"
export InterCommonName="inter.hashidemos.io"
export Root_CA_ttl="730h"
export Inter_CA_ttl="350h"
export Cert_ttl="8h"
@WhatsARanjit
WhatsARanjit / shell.sh
Created June 30, 2017 15:13
Sharing data by jacking exported resources
[root@puppet2017 ~]# cat /tmp/test.pp
$epptemplate = @(EPP/L)
<%- | $nodes | -%>
My nodes:
<% $nodes.each |$n| { -%>
Hostname: <%= $n[0] %>
IP: <%= $n[1] %>
<% } -%>
| EPP
@WhatsARanjit
WhatsARanjit / hiera.yaml
Last active June 2, 2017 23:38
Convert hiera3 to hiera5
---
:backends:
- yaml
- eyaml
- mongodb
- xml
:yaml:
:datadir: "/etc/puppetlabs/code/environments/%{environment}/hieradata"
@WhatsARanjit
WhatsARanjit / .bashrc
Last active June 26, 2017 16:22
Puppet bashrcs
# Source global definitions
[[ -f /etc/bashrc ]] && source /etc/bashrc
# load customizations, such as the pretty git prompt.
# comment this out to use your own customizations.
[[ -f ~/.bashrc.puppet ]] && source ~/.bashrc.puppet
# Pull in customizations
[[ -f ~/.profile ]] && source ~/.profile
@WhatsARanjit
WhatsARanjit / groups.pp
Created February 12, 2015 18:38
PE Node Classifier Groups
node_group { 'PE ActiveMQ Broker':
ensure => 'present',
classes => {'puppet_enterprise::profile::amq::broker' => {}},
environment => 'production',
id => '19394fe0-f0bd-4d3c-ad9d-3cc4ca626982',
override_environment => 'false',
parent => 'PE Infrastructure',
rule => ['or', ['=', 'name', 'master.puppetlabs.vm']],
}
node_group { 'PE Certificate Authority':