Skip to content

Instantly share code, notes, and snippets.

View austinpapp's full-sized avatar

austin austinpapp

View GitHub Profile
#
# _modules/hotdog.py
#
# NOTE:
# This module only works with a reactor listening in on `hotdog/*`
# The reactor is what returns the data which is randomly hotdog or not-hotdog
#
# The idea is to send an event from a minion and wait for the return event to hit the minion. We track
# the event from start to finish by using a guid attached to the event. this event is what helps us
# track the complete event service time from minion -> reactor (master) -> minion.
@austinpapp
austinpapp / __init__.py
Last active June 19, 2018 14:28
Simple saltstack sseapi wrapper for testing purposes
from sseapi import Sched, Ret, Job
__all__ = ('Sched','Ret','Job')
runner1:
salt.runner:
- name: test.stdout_print
- parallel: True
runner2:
salt.runner:
- name: test.stdout_print
- parallel: True
#!/bin/bash
curl -sSk http://192.168.11.10:8000 \
-b ./cookies.txt \
-H "Accept: application/json" \
-H "Content-type: application/json" \
-d '[{
"client": "local_async",
"tgt":"overlord",
"fun":"state.sls",
"kwarg": { "mods": "test.s_test-state1" }
s3.keyid: x
s3.key: x
s3.verify_ssl: False
s3.location: us-east-1
s3.buckets:
  - deployment-data

fileserver_backend:
 - roots

run no.1:

          ID: get-deploy-server.key
    Function: file.managed
        Name: /srv/certs/server.key
      Result: False
     Comment: File sum set for file /srv/certs/server.key of 1a5790c00acd4a19f3eae17dfc19d5800438303bf2318fdb6e17ece50b555c9f does not match real sum of 6c36e8bfd88db0b956f47f5f37036d73cf919a6950cec0b2a6b27f6c6774431c
     Started: 14:30:47.468295
    Duration: 46.769 ms
     Changes:
github-ssh-key:
file.managed:
- name: /root/.ssh/{{ salt['pillar.get']('inf-private:github:key-name') }}
- contents_pillar: {{ salt['pillar.get']('inf-private:github:key') }}
- mode: 600
civix:
symfony:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_port:
database_name: civix
database_user: civix
database_password: civix
mailer_transport: smtp
ID: get-pip
Function: file.managed
Name: /tmp/get-pip.py
Result: True
Comment: unless execution succeeded
Started: 21:06:01.890989
Duration: 917.375 ms
Changes:
----------
ID: get-pip
{% set ipv6_enabled = [] %}
{% for ip in grains["ipv6"] %}
{% if ip[:12] in ["fe80::a00:27"] %}
echo found {{ ip }}:
cmd.run
echo before {{ ipv6_enabled }}:
cmd.run
{% do ipv6_enabled.append(1) %}
echo after {{ ipv6_enabled }}: