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 | |
# Configure salt-minion | |
# @author Michael Poore | |
## Adding salt repository | |
echo 'Adding salt repository ...' | |
major_version=$(echo $OS_VERSION | cut -d '.' -f 1) | |
echo "-- OS major version: $major_version" | |
rpm --import https://repo.saltproject.io/salt/py3/redhat/$major_version/x86_64/SALT-PROJECT-GPG-PUBKEY-2023.pub &>/dev/null | |
curl -fsSL https://repo.saltproject.io/salt/py3/redhat/$major_version/x86_64/latest.repo | tee /etc/yum.repos.d/salt.repo &>/dev/null |
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
#cloud-config | |
# Upgrade the instance on first boot | |
# (ie run apt-get upgrade) | |
# | |
# Default: false | |
# Aliases: apt_upgrade | |
package_upgrade: 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
/* ---------------------------------------------------------------------------- | |
Name: createDeploymentNameFromCatalogItemNameAndEnv | |
Description: Creates a unique vRA deployment name based on the | |
Catalog Item name and a date/time | |
Author: Michael Poore (@mpoore) | |
URL: https://github.com/v12n-io/vro-repository | |
Date: 14/02/2021 | |
Version: 0.0.1 | |
Changes: |
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
formatVersion: 1 | |
inputs: | |
compute: | |
type: object | |
$ref: /ref/property-groups/compute-properties | |
resources: | |
Cloud_Machine_1: | |
type: Cloud.Machine | |
properties: | |
image: '${input.compute.image}' |
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
System.log("==== Begin: vRA Event Broker Payload Properties ===="); | |
logAllProperties(payload,0); | |
System.log("==== End: vRA Event Broker Payload Properties ===="); | |
function logAllProperties(props,indent) { | |
var keys = (props.keys).sort(); | |
for each (var key in keys) { | |
var prop = props.get(key); | |
var type = System.getObjectType(prop); | |
if (type == "Properties") { |
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
// Set variables | |
var result = attNameFormat; | |
var hostnameIdx = attIndexFormat; | |
var nextNum = 0; | |
var digitCount = attNameFormat.match(/(#)/g).length; | |
// Create request object | |
var requestObj = JSON.parse(request.toLowerCase()); | |
// Create translations object | |
var translationsObj = JSON.parse(attTranslations.getContentAsMimeAttachment().content.toLowerCase()); |
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
# Basic configuration of vanilla Windows Server installation to progress Packer.io builds | |
# @author Michael Poore | |
# @website https://blog.v12n.io | |
# @source https://github.com/virtualhobbit | |
$ErrorActionPreference = "Stop" | |
# Switch network connection to private mode | |
# Required for WinRM firewall rules | |
$profile = Get-NetConnectionProfile | |
Set-NetConnectionProfile -Name $profile.Name -NetworkCategory Private |
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
# Second-phase configuration of vanilla Windows Server installation to progress Packer.io builds | |
# @author Michael Poore | |
# @website https://blog.v12n.io | |
$ErrorActionPreference = "Stop" | |
# Variables | |
$certUrl = "http://<<PKI server>>/CertEnroll" | |
$certRoot = "Root-CA.crt" | |
$certIssuing = "uIssuing-CA.crt" | |
$repository = "http://<<artifactory>>:8082/artifactory/packer-local/windows/common/utils/BGinfo" |