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: Setup Icinga2 Client | |
hosts: all | |
vars: | |
icinga2_pki_path: /var/lib/icinga2/certs | |
icinga2_master: "icinga-master.fqdn" | |
icinga2_cn: "{{ inventory_hostname }}" | |
icinga2_zone: "{{ inventory_hostname }}" | |
# connection direction: master <- client | |
icinga2_endpoint: "icinga-satellite-or-master.fqdn,icinga-satellite-or-master.fqdn,5665" |
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: Remove CNAME record | |
route53: | |
state: absent | |
zone: "{{ item.zone }}" | |
record: "{{ item.record }}" | |
type: CNAME | |
value: "{{ item.target }}" | |
loop: | |
- { record: "somthing", zone: "example.com", target: "target.host.example.com" } | |
- { record: "another.one", zone: "example.com", target: "target.host.example.com" } |
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
- route53: | |
state: get | |
zone: foo.com | |
record: new.foo.com | |
type: CNAME | |
register: rec | |
- debug: | |
msg: rec |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# vim: ts=4:sw=4:et | |
import revpimodio2 | |
import paho.mqtt.client as mqtt | |
# connect to mqtt broker | |
client = mqtt.Client() | |
client.connect("your-broker.example.com", 1883) |
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
--- | |
- hosts: jitsi | |
become: True | |
vars: | |
jitsi_domain: "jitsi.example.org" | |
certbot_mail: "[email protected]" | |
pre_tasks: | |
- name: Enable tls transport for apt | |
apt: | |
name: apt-transport-https |
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: schedule downtime | |
uri: | |
url: "https://{{ icinga_host }}:{{ icinga_port | default(5665) }}/v1/actions/schedule-downtime" | |
user: "{{ icinga_user }}" | |
password: "{{ icinga_password }}" | |
force_basic_auth: True | |
validate_certs: False | |
method: POST | |
headers: | |
Accept: "application/json" |
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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"name": "Annotations & Alerts", |
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 revpimodio2 | |
def ev(name, value): | |
# payload is bytes, so we need to know the enconding (eg. ascii, utf-8, etc...) | |
print(name, value.decode('ascii')) | |
rpi = revpimodio2.RevPiModIO(autorefresh=True, monitoring=True) | |
rpi.handlesignalend() | |
# define IO: change length of string in the frm argument |
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
#!/usr/bin/env python3 | |
import sys | |
import json | |
import argparse | |
import os.path | |
DEFAULT_CONFIG_NEW = "/var/www/revpi/pictory/projects/_config.rsc" | |
DEFAULT_CONFIG_OLD = "/var/www/pictory/projects/_config.rsc" |
OlderNewer