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
#Spin up Kubernetes control plane as part of before_script, and destroys it using after_script | |
#Some custom logic to get to the right ip address | |
#Requres the gitlab docker runner, with "pass-thru" to the host docker socket. | |
stages: | |
- test | |
image: python:3.6.6 #the docker image you run in needs Docker installed, and access to the host docker socket. | |
test_integration_k8s: | |
tags: |
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
#!powershell | |
# <COPYRIGHT> | |
# <CODEGENMETA> | |
# | |
# This file is part of Ansible | |
# | |
# Ansible is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
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
from hashlib import sha1 | |
import json | |
def generate_cache_key(start_url, role_name, account_id): | |
args = { | |
'startUrl': start_url, | |
'roleName': role_name, | |
'accountId': account_id, | |
} |
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
Param ( | |
[string]$SubjectName = $env:COMPUTERNAME, | |
[int]$CertValidityDays = 365, | |
$CreateSelfSignedCert = $true | |
) | |
#region function defs | |
Function New-LegacySelfSignedCert | |
{ |
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
# Lots of other resources are created and all of that stuff works so I'm just skipping the not-so-relevant parts. | |
resource "aws_route_table" "private" { | |
for_each = toset(var.public_subnets) | |
vpc_id = aws_vpc.main.id | |
route { | |
cidr_block = "0.0.0.0/0" | |
nat_gateway_id = aws_nat_gateway.natgw[each.key].id #this ressource exists andd is based on a foreach of the public_subnets variable, I just omitted it from the example here. | |
} |
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
# Script to set a windows computer up for remoting | |
# The script checks the current WinRM/Remoting configuration and makes the necessary changes | |
# set $VerbosePreference="Continue" before running the script in order to see the output of the script | |
# | |
# Written by Trond Hindenes <trond@hindenes.com> | |
# | |
# Version 1.0 - July 6th, 2014 | |
Param ( |
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
# Change line 138/139 from | |
# except AuthenticationError: | |
# raise AnsibleError('Invalid credentials provided.') | |
#to: | |
except AuthenticationError as e: | |
raise AnsibleError(str(e)) | |
#This will surface the actual exception from azure, instead of just printing a generic one. | |
#It might be possible to use `(e)` instead of `(str(e))` depending on what param AnsibleError takes. It might provide more info |
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
#Install pips: | |
#aws-cdk-cdk | |
#aws-cdk-aws-ec2 | |
import json | |
from aws_cdk import cdk | |
from aws_cdk import aws_ec2 | |
app = cdk.App() | |
stack = cdk.Stack(app, 'MyStack') |
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
Workflow Dummy-WFInner | |
{ | |
Param ( | |
[Parameter(Mandatory=$true)] | |
[PsCredential]$credential, | |
[Parameter(Mandatory=$true)] | |
[String]$subscriptionid, | |
[Parameter(Mandatory=$true)] |
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
workflow set-MITPrestageADComputer | |
{ | |
Param ( | |
[String]$CompName, | |
[string]$OU, | |
$Credential | |
) | |
Write-Output "Prestaging computer $CompName, OU $OU" | |
NewerOlder