Assuming
- You are using Vagrant and Shell provisioner often (e.g when doing Windows provisioning you will end up using Powershell a lot)
- You have started running into the problem of reusing your scripts
Assuming
<# | |
.DESCRIPTION | |
Outputs the SSL protocols that the client is able to successfully use to connect to a server. | |
.PARAMETER ComputerName | |
The name of the remote computer to connect to. | |
.PARAMETER Port | |
The remote port to connect to. The default is 443. |
# Powershell script to trigger a Team City build from Octopus Deploy, and wait for it to be finished | |
# Use case for this is running an automated script (such as test scripts) from Team City as part of | |
# a deployment, and holding the deployment until the script has finished | |
# teamcity-host teamcity host url | |
# teamcity-username teamcity api username | |
# teamcity-password teamcity api password | |
# teamcity-build-configuration-id teamcity build configuration | |
# teamcity-changeset (optional) changeset to build from - NOTE: this is a VCS changeset |
# -*- coding: utf-8 -*- | |
''' | |
Execution module to work with HashiCorp's Vault | |
:depends: - python-requests | |
In order to use an this module, a profile must be created in the master | |
configuration file: | |
Token example: |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.network :private_network, ip: "192.168.33.15" | |
$script = <<-SCRIPT | |
reset | |
sudo apt-get update |
#!/bin/bash | |
MAIN=${1:-development} | |
BRANCHES=$(git branch --merged $MAIN | grep -v -e 'master\|staging\|development\|\*') | |
echo Branches merged into $MAIN: | |
echo $BRANCHES | |
read -p "Delete these branches (y/n)? " answer |
VAGRANTFILE_API_VERSION = "2" | |
require 'io/console' | |
# Capture login details if starting up vagrant or provisioning it | |
# Required for AD operations. | |
# | |
# Environment variables prevent explicit user input. Useful for CI. | |
username = ENV["VAGRANT_USER"] || nil | |
password = ENV["VAGRANT_PASSWORD"] || nil |
# Path where to create the biztalk groups and service accounts | |
$BtsOuPath = "OU=BizTalk,OU=Service Accounts,DC=LABO,DC=local" | |
# Path where to create the biztalk admin user | |
$AdminOuPath = "CN=Users,DC=LABO,DC=local" | |
$DomainAdmin = "JMADMIN" | |
$BtsAdmin = "BTSADMIN" | |
# Convert the plain text passwords | |
$BtsAdminPassword = ConvertTo-SecureString "P@$$w0rd0" -AsPlainText -Force |
$Hso = New-Object Net.HttpListener | |
$Hso.Prefixes.Add("http://+:8000/") | |
$Hso.Start() | |
While ($Hso.IsListening) { | |
$HC = $Hso.GetContext() | |
$HRes = $HC.Response | |
$HRes.Headers.Add("Content-Type","text/plain") | |
$Buf = [Text.Encoding]::UTF8.GetBytes((GC (Join-Path $Pwd ($HC.Request).RawUrl))) | |
$HRes.ContentLength64 = $Buf.Length | |
$HRes.OutputStream.Write($Buf,0,$Buf.Length) |