Skip to content

Instantly share code, notes, and snippets.

View Kgirthofer's full-sized avatar
👻

Karl Girthofer Kgirthofer

👻
  • Philadelphia, PA
View GitHub Profile
"portMappings": [
{
"hostPort": 80,
"containerPort": 80
}
],
describe 'certs::default' do
cached(:chef_run) { default_chef_run }
subject { chef_run }
before :each do
stub_command(/.*/).and_return true
# need to stub out a data bag? see .kitchen.yml too.
allow(Chef::EncryptedDataBagItem).to receive(:load).and_return 'stuff'
end
$servers = @(”ServerNames","AnotherServerName")
Start-Sleep -Seconds 15
Foreach ($server in $servers) {
$count = 0
while ( (Get-Service -Name TermService -ComputerName $server).Status -ne "Running" ) {
"Waiting for $server ..."
Start-Sleep -Seconds 20
$count ++
if ($count -eq 25){break :FailCheck}
}
#!/bin/bash
arr=($(aws ec2 describe-instances --filters "Name=tag-key,Values=Purge" --output table | grep InstanceId | awk '{print $4}'))
for index in "${!arr[@]}"
do
purge_time=$(aws ec2 describe-instances --instance-ids ${!arr[index]})
if $purge_time = 24h; then
printf "got one"
fi