Contents by David Walton and Marco Hladik. Edited and compiled by Marco Hladik.
Last updated: 10th August 2018, 9:21 PM GMT
{%- set grns = salt.saltutil.runner('cache.grains', tgt='serv*') %} | |
{%- for id, grn in grns.items()|sort %} | |
{%- set role = id[3:6] %} | |
address: {{ grn.ip4_interfaces.eth0[0] | default("127.0.0.1") }} | |
{%- endfor %} |
#!py | |
# test.sls | |
import yaml | |
def run(): | |
config = {} | |
map_file = __salt__.cp.cache_file("salt://formula/map.yaml") |
The AWS Auto Scaling Goup, configured with a customised Cloud-Init file, sends a notification to an SNS Topic, which in turn passes it onto an SQS queue that the Salt Master is subscribed to. A Reactor watches for the auto scaling events and pre-approves the new minion based on its Auto Scaling group name and instance ID.
def environments = ["development", "staging", "production"] | |
stage("deploy to multiple environments") { | |
def deployments = [:] | |
environments.each { e -> | |
deployments[e] = { | |
stage(e) { | |
podTemplate(yaml: """\ | |
apiVersion: v1 | |
kind: Pod |
import yaml | |
from copy import copy, deepcopy | |
from yaml.nodes import MappingNode | |
from yaml.loader import Loader | |
from yaml.constructor import SafeConstructor | |
# Copyright Ferry Boender, released under the MIT license. | |
def deepupdate(tgt, src): |
{ | |
"clients": { | |
"pyls": { | |
"command": [ | |
"~/.environments/pyls/bin/pyls" | |
], | |
"enabled": false, | |
"settings": { | |
"pyls": { | |
"plugins": { |
%YAML 1.2 | |
--- | |
# http://www.sublimetext.com/docs/3/syntax.html | |
name: effectinfo | |
file_extensions: | |
- txt | |
scope: source.effectinfo | |
variables: |
import os | |
import hashlib | |
from zipfile import ZipFile, BadZipFile | |
from datetime import datetime | |
from vgio.quake.pak import PakFile, BadPakFile # https://github.com/joshuaskelly/vgio/ <3 | |
from typing import Union, BinaryIO | |
def get_digest(b): | |
"""Calculate the SHA256 hash of the bytes""" |
// Game: Quake | |
// Format: Standard | |
// entity 0 | |
{ | |
"classname" "worldspawn" | |
"_tb_mod" "src;progs_dump" | |
"_tb_def" "external:/home/james/.darkplaces/hipnotic/maps/src/hipnotic.fgd" | |
"wad" "/home/james/.darkplaces/id1/maps/src/prototype.wad" | |
// brush 0 | |
{ |