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
default['waiver_file_name'] = node['ec2'] ? 'aws.yml' : 'on-prem.yml' | |
default['audit']['waiver_file'] = "#{Chef::Config[:file_cache_path]}/#{node['waiver_file_name']}" |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
config.vm.box = "bento/centos-7.4" | |
config.vm.network "private_network", ip: "192.168.33.10" |
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
# => .chef/config.rb | |
# see https://docs.chef.io/config_rb.html | |
# Chef commands interaction | |
cookbook_path ['path_to_cookbooks'] | |
# Knife commands will run against local as opposed to a chef server, | |
# files created on the local as opposed to temp files then upload to chef | |
# server. |
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 | |
SSL_PORT=8443 | |
CHEF_DIR=$(pwd)/.chef | |
# docker run --privileged -t --name localhost -d -p $SSL_PORT:443 -e CONTAINER_NAME=localhost cbuisson/chef-server | |
if [ -d "$CHEF_DIR" ]; then | |
rm -rf $CHEF_DIR | |
fi |
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 | |
REPO_URL="https://repository.xxx.net/repository/" | |
USER="admin" | |
PASSWORD="datpassword" | |
BUCKET="portal-docker" | |
KEEP_IMAGES=10 | |
IMAGES=$(curl --silent -X GET -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' -u ${USER}:${PASSWORD} "${REPO_URL}${BUCKET}/v2/_catalog" | jq .repositories | jq -r '.[]' ) |
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
require 'ostruct' | |
module AutomateSoup | |
## | |
# Class to represent operations on a change. | |
# | |
class Change | |
def initialize(hash) | |
@source = OpenStruct.new hash | |
end |
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
build | |
Builds a job, and optionally waits until its completion. | |
cancel-quiet-down | |
Cancel the effect of the "quiet-down" command. | |
clear-queue | |
Clears the build queue | |
connect-node | |
Reconnect to a node | |
copy-job | |
Copies a job. |
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
extern crate serde_json; | |
extern crate handlebars; | |
#[macro_use] | |
extern crate maplit; | |
use std::path::Path; | |
use handlebars::Handlebars; | |
use serde_json::Value; |
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
$LOAD_PATH.unshift(*Dir[File.expand_path('../vendor/gems/**/lib', __FILE__)]) | |
require 'ruby_expect' | |
# Custom resource based on the InSpec resource DSL | |
class PerlModules < Inspec.resource(1) | |
name 'perl_modules' | |
desc " | |
Perl Modules resource for extracting the perl modules via instmodsh. |
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
require 'mail' | |
args = ARGV | |
user = args[0] | |
pass = args[1] | |
options = { :address => "smtp.gmail.com", | |
:port => 587, | |
:user_name => user, | |
:password => pass, |
NewerOlder