This file contains hidden or 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
blueprint: | |
name: Plex Lighting Automation | |
description: Control lights based on Plex media player state. | |
domain: automation | |
input: | |
main_settings: | |
name: Main Settings | |
icon: mdi:play-circle-outline | |
description: "These are the main settings for the Plex Lighting Automation." |
This file contains hidden or 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
function Get-BearerToken { | |
param ( | |
$vra_server, | |
$password, #Make sure you're passing a value securely here, and not using plain text... be smart :-) | |
$username, | |
$domain | |
) | |
# Create headers for authentication and bearer token generation | |
$authHeaders = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" |
This file contains hidden or 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
#Create a comment block starting at line 241, right before @app.route("/") and ending right before @app.route("/endpoint/test", methods=['POST']) | |
239 return ("%s" % r.text, r.status_code, None) | |
240 | |
241 ''' | |
242 @app.route("/") | |
243 def _introduction(): | |
244 """This help text.""" | |
245 ret = _minimal_markdown(Markup("<p>%s</p>") % __doc__) | |
246 ret += Markup("<dl>") | |
247 |
This file contains hidden or 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
#Starting at line 278, comment out all shims you aren't using | |
277 # Import individual shims | |
278 #import loginsightwebhookdemo.bigpanda | |
279 #import loginsightwebhookdemo.bugzilla | |
280 #import loginsightwebhookdemo.groove | |
281 #import loginsightwebhookdemo.hipchat | |
282 #import loginsightwebhookdemo.jenkins | |
283 #import loginsightwebhookdemo.jira | |
284 #import loginsightwebhookdemo.kafkatopic | |
285 import loginsightwebhookdemo.opsgenie |
This file contains hidden or 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
{ | |
"hostname": "photon", | |
"password": { | |
"crypted": false, | |
"text": "[yourpassword]" | |
}, | |
"bootmode": "bios", | |
"disk": "/dev/sda", | |
"linux_flavor": "linux", | |
"packagelist_file": "packages_minimal.json", |
This file contains hidden or 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 Prerequisite Packages from Repo | |
tdnf install wget curl python3 python3-xml python3-pip git nginx -y | |
#Clone git repository | |
git clone https://github.com/vmw-loginsight/webhook-shims.git | |
#Install pip packages | |
pip3 install uwsgi | |
pip3 install gunicorn | |
pip3 install -r ./loginsightwebhookdemo/webhook-shims/requirements.txt |
This file contains hidden or 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
#/etc/systemd/system/gunicorn.service | |
[Unit] | |
Description=gunicorn daemon | |
Requires=gunicorn.socket | |
After=network.target | |
[Service] | |
Type=notify | |
# the specific user that our service will run as | |
User=root |
This file contains hidden or 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
#/etc/systemd/system/gunicorn.socket | |
[Unit] | |
Description=gunicorn socket | |
[Socket] | |
ListenStream=/run/gunicorn.sock | |
# Our service won't need permissions for the socket, since it | |
# inherits the file descriptor by socket activation | |
# only the nginx daemon will need access to the socket | |
SocketUser=nobody |
This file contains hidden or 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
#/etc/nginx/nginx.conf | |
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; |
This file contains hidden or 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
# Author: Jon Howe | |
# Blog: https://www.virtjunkie.com/vmware-provisioning-using-hashicorp-terraform-part-2/ | |
# GitHub: https://github.com/jonhowe/Terraform-vSphere-VirtualMachine/blob/master/examples/multi-vm/main.tf | |
module "DC1" { | |
is_windows_image = "1" | |
source = "github.com/jonhowe/Terraform-vSphere-VirtualMachine/" | |
vsphere_server = "vcenter.home.lab" | |
vsphere_user = "administrator@vsphere.local" | |
vsphere_password = "VMware1!" |
NewerOlder