Skip to content

Instantly share code, notes, and snippets.

View galenemery's full-sized avatar

Galen E. galenemery

View GitHub Profile
### Keybase proof
I hereby claim:
* I am galenemery on github.
* I am galenemery (https://keybase.io/galenemery) on keybase.
* I have a public key ASDjrbaJgPVoSKW4_xroziPfCiWbbznHjtOt98-U7DjtYAo
To claim this, I am signing this object:
@galenemery
galenemery / audit.json
Created May 3, 2018 19:37
Example audit role for audit cookbook
{
"name": "audit",
"description": "Audit Role",
"default_attributes": {
"audit": {
"inspec_version": "2.1.59",
"fetcher": "chef-server",
"reporter": "chef-server-automate",
"profiles": [
{
@galenemery
galenemery / aws-deploy.rb
Last active January 2, 2018 18:53
Chef Provisioning AWS example
machine_batch do
1.upto(6) do |i|
machine "#{name}-prodweb#{i}" do
driver 'aws'
tag 'my-webserver'
machine_options :region => node["aws_deploy"]["region"],
:location => node["aws_deploy"]["location"],
:ssh_username => node["aws_deploy"]["ssh_username"],
:aws_tags => {"belongs_to" => name},
:convergence_options => {
@galenemery
galenemery / audit.json
Last active June 15, 2017 19:08
Example Audit Role for Chef Automate
{
"name": "audit",
"description": "Audit Role",
"default_attributes": {
"audit": {
"fetcher": "chef-server",
"reporter": "chef-server-automate",
"profiles": [
{
"name": "cis-rhel7-level1-server",
{
"name": "base",
"description": "Base Server Role",
"default_attributes": {
"chef_client": {
"interval": 300,
"splay": 60,
"config": {
"ssl_verify_mode": ":verify_peer",
"log_level": ":info"
@galenemery
galenemery / .kitchen.yml
Created June 23, 2016 13:16
motd_ubuntu_ec2_kitchen_yml
---
provisioner:
name: chef_zero
platforms:
- name: ec2-ubuntu-14.04
driver:
image_id: ami-4c7a3924
name: ec2
@galenemery
galenemery / _etc_opscode_chef-server.rb
Last active April 27, 2016 17:46
chef-server + Analytics Combined
topology 'standalone'
api_fqdn 'cad-chef-server'
nginx['server_name'] = 'cad-chef-server'
oc_id['vip'] = 'cad-chef-server'
oc_id['applications'] = {
'analytics' => { 'redirect_uri' => 'https://cad-chef-server:8443/' },
'supermarket' => { 'redirect_uri' => 'https://cad-supermarket/auth/chef_oauth2/callback' }
}
rabbitmq['vip'] = '172.31.54.57'
@galenemery
galenemery / _etc_opscode_chef-server.rb
Created April 27, 2016 17:39
chef-server + Analytics Combined
topology 'standalone'
api_fqdn 'cad-chef-server'
nginx['server_name'] = 'cad-chef-server'
oc_id['vip'] = 'cad-chef-server'
oc_id['applications'] = {
'analytics' => { 'redirect_uri' => 'https://cad-chef-server:8443/' },
'supermarket' => { 'redirect_uri' => 'https://cad-supermarket/auth/chef_oauth2/callback' }
}
rabbitmq['vip'] = '172.31.54.57'
delivery setup --server=cad-delivery --ent=cad --org=ORG --user=chef
@galenemery
galenemery / iim_install.rb
Created February 5, 2016 19:01
Modified iim_install resource.
iim_install 'ihs' do
#The idea here is to pass the responsefilepath directly into the iim_install resource.
#The response_file_install resource merely determines if the file exists, and if not creates it.
#Because the file already exists, we don't need to do this.
install_command_snippet "input #{::File.path(responseFilePath)}"
#all these default to null, and depending on your repositories security settings they might be able to remain that way.
master_password_file node[:ihs][:install][:masterPasswordFile]
secure_storage_file node[:ihs][:install][:secureStorageFile]
action :install
end