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
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
) | |
func handle(writer http.ResponseWriter, request *http.Request) { |
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 | |
set -ex | |
DATE="$(date +%Y%m%d%H%M%S)" | |
JENKINS_HOME="/var/lib/jenkins" | |
BACKUP="/opt/backup/${DATE}" | |
SOURCES="${BACKUP}/SOURCES" | |
SPECS="${BACKUP}/SPECS" | |
RPMS="${BACKUP}/RPMS" | |
REPO="/opt/repo/rpms" |
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
FROM gliderlabs/alpine:3.1 | |
ENV JAVA_HOME /usr/lib/jvm/java-1.7-openjdk | |
RUN apk add --update openjdk7-jre-base bash \ | |
&& rm -rf /var/cache/apk/* |
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 | |
set -e | |
MASTER_TOKEN="$1" | |
AGENT_TOKEN="$2" | |
create_acl() { | |
curl -X PUT "http://localhost:8500/v1/acl/create?token=$MASTER_TOKEN" \ | |
-d '{"Name": "agent_policy", "Type": "client", "Rules": "service \"\" {policy = \"write\"}"}' | |
} |
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: | |
- name: statsd_host | |
type: string | |
required: false | |
- name: statsd_port | |
type: int | |
required: false | |
- name: statsd_namespace |
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
all: | |
systems: | |
- name: private_ip | |
required: false | |
peer_exposed: true | |
applied_scopes: | |
- host | |
- name: private_fqdn | |
required: false |
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
type: map | |
mapping: | |
name: | |
type: str | |
length: { min: 1, max: 35 } | |
required: yes | |
pattern: /^(?=.*[a-zA-Z])([^\s]+)$/ | |
version: | |
type: str | |
length: { min: 1, max: 35 } |
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/python -tt | |
from Composer import Composer | |
import yaml | |
import os | |
from sys import exit | |
if __name__ == '__main__': | |
from optparse import OptionParser |
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 | |
# requires root effective permissions | |
if [[ "$(id -u)" -ne 0 ]]; then | |
echo "Error: $0 must execute as root." | |
exit 1 | |
fi | |
# create list of active kernel modules | |
lsmod | awk '$3 > 0 && NR > 1 {print $1}' > module.lst |
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: check if avahi installed | |
command: rpm -q avahi | |
register: avahi_service | |
changed_when: no | |
failed_when: no | |
tags: | |
- dnsmasq | |
- name: disable avahi-daemon |