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
""" | |
Sample usage | |
- name: find another host to join to form a cluster (e.g. Consul) | |
set_fact: | |
host_to_join: > | |
{{ | |
groups['my_group'] | difference([inventory_hostname]) | |
| list | |
| random |
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
import json | |
from jsonschema import Draft4Validator, SchemaError | |
from sys import stderr | |
from os import path | |
import functools | |
# JSON schema validator | |
def validate_against_schema(document, schema): |
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
### Keybase proof | |
I hereby claim: | |
* I am ValFadeev on github. | |
* I am sinlemn (https://keybase.io/sinlemn) on keybase. | |
* I have a public key whose fingerprint is B889 2C98 5C6F BDDC B6BD 441B 4EE2 C2F6 718E 4808 | |
To claim this, I am signing this object: |
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
# reusable job running Docker container on Nomad with templated image name and label | |
- description: '' | |
executionEnabled: true | |
id: f3b67ad3-5e86-4bd6-9195-742f35a8af89 | |
loglevel: INFO | |
name: nomad_step | |
nodeFilterEditable: false | |
options: | |
- name: version |
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
# Note: for production use consider setting up forwarding via a standard host-based resolver: | |
# https://www.consul.io/docs/guides/forwarding.html | |
# consul 0.9.0 | |
sudo consul agent -dev \ | |
-node consul \ | |
-advertise 192.168.0.2 \ | |
-client 192.168.0.2 \ | |
-dns-port 53 | |
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
variable "foo" { | |
default = "bar" | |
} | |
data "template_file" "tmpl" { | |
template = "$${foo}" | |
vars { | |
foo = "${var.foo}" | |
} |