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
## Configure httpd | |
class { 'apache': | |
default_vhost => 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
# Add in apt repository for Ansible 2.4 then install | |
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" > /etc/apt/sources.list.d/ansible-ubuntu-ansible-xenial.list | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7BB9C367 | |
apt-get update | |
apt-get upgrade ansible -y |
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
Generating a pub cert from your private key ( This is going to be stored inside Ansible mist under each user ) | |
openssl req -x509 -new -key ~/.ssh/id_rsa -nodes -subj "/C=GB/ST=*/L=*/O=*/OU=*/CN=NAMEHERE/" | |
Encrypting some data against the above key(s) | |
echo STRINGTOENCRYPT | openssl smime -encrypt -aes256 -outform PEM /tmp/rick.CERT /tmp/james.CERT /tmp/stuartgr.CERT | |
Decrypting data |
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
pipeline { | |
agent none | |
stages { | |
stage('Check Role') { | |
parallel { | |
stage('Test Xenial') { | |
agent any | |
steps { | |
sh 'cd tests && vagrant destroy --force || true' | |
sh 'cd tests && vagrant up --provider docker xenial' |
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
pipeline { | |
agent none | |
stages { | |
stage('Check Role') { | |
parallel { | |
stage('Test Xenial') { | |
agent any | |
steps { | |
dir('tests') { | |
sh 'vagrant destroy --force || 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
@Library("vagrant_ansible") _ | |
vagrant_ansible { | |
provider = 'docker' | |
distros = [ 'xenial', 'bionic' ] | |
} |
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
# Get current role name, and append branch name and build number if set | |
current_role = File.basename(File.expand_path("..", Dir.pwd)) | |
if ENV['BRANCH_NAME'] && ENV['BUILD_NUMBER'] | |
current_role << "-#{ENV['BRANCH_NAME']}-#{ENV['BUILD_NUMBER']}" | |
end | |
Vagrant.configure("2") do |config| | |
config.vm.define "bionic", primary: true do |bionic| |
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 'open-uri' | |
require 'openssl' | |
url = 'https://remote.vagranturi/vagrantfile' | |
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE | |
download = open(url) | |
IO.copy_stream(download, '.downloaded.vagrantfile') |
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
import multiprocessing | |
from multiprocessing import Pool | |
from time import sleep | |
list_of_numbers = list(xrange(101)) | |
def pull_role(stuff): | |
print('Sleeping ' + str(stuff)) | |
sleep(0.1) |
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
pipelineJob('test2') { | |
logRotator { | |
numToKeep(10) | |
} | |
definition { | |
cps { | |
script(""" | |
pipeline | |
{ |
OlderNewer