INVENTORY DEVICES | INVENTORY GROUPS | HOST VARS | GROUP VARS | |
---|---|---|---|---|
branch name | inventory-J5J00m0g |
inventory-8dXcznrc |
host_vars-wwIkxD9o |
group_vars-rRe9IBeN |
commit message | Added 3 devices to inventory |
Removed 2 groups from inventory |
Add data with x operation |
Performed a merge on group_vars |
pull title | Update inventory |
Update inventory |
Update host vars |
Update group vars |
pull body |
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
db_name = _config.get('db_name') | |
connection_string = "mysql://{0}:{1}@{2}/{3}".format(username, | |
password, | |
server, | |
db_name) | |
engine = sqlalchemy.create_engine(connection_string, listeners=listeners) | |
engine.execute("CREATE DATABASE IF NOT EXISTS {0} ".format(db_name)) |
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 minimalmodbus | |
import sys | |
SERIAL_PORT = '/' | |
DEVICE_ADDRESS = 1 | |
DECIMAL_COUNT = 1 | |
def modbus_RTU(): | |
try: |
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 bats | |
@test "RTC present" { | |
run timedatectl status | |
[ "$status" -ne 127] | |
} | |
@test "NTP enabled" { | |
result="$(timedatectl status | grep "Network time on:")" |
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 | |
if [ -e /tmp/ping-test.pid ] | |
then | |
echo "script already running" | |
exit 1; | |
fi | |
PID=$$ | |
HOST=$1 |
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
configuration: autonegotiation=on broadcast=yes driver=e1000 driverversion=7.3.21-k8-NAPI duplex=full ip=10.0.2.15 latency=64 link=yes mingnt=255 multicast=yes port=twisted pair speed=1Gbit/s | |
resources: irq:19 memory:f0000000-f001ffff ioport:d010(size=8) |
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
GITHUB_API = 'https://api.github.com' | |
import requests | |
import getpass | |
import json | |
from urlparse import urljoin | |
def main(): | |
# |
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 generate | |
z = generate.load_all() | |
generate.story(z, './images/ex1.jpg') |