Skip to content

Instantly share code, notes, and snippets.

View kedare's full-sized avatar

Mathieu Poussin kedare

View GitHub Profile
----------
ID: Python should be installed
Function: pkg.installed
Name: xxx_python3
Result: False
Comment: The following packages failed to install/update: xxx_python3=3.6.1
Started: 16:48:34.459000
Duration: 57414.0 ms
Changes:
----------
Get the Automapper module:
file.recurse:
- name: C:\temp\gac\automapper\
- source: salt://windows/automapper/
Get the IIS rewrite module:
file.recurse:
- name: C:\temp\gac\iis\
- source: salt://windows/iis/
Make sure RabbitMQ is running on Docker:
dockerng.running:
- name: {{ pillar["application_environment"] }}-rabbitmq
- image: rabbitmq:management
- port_bindings: "5672:5672,15672:15672"
{% for vhost in pillar["rabbitmq"]["vhosts"] %}
Create the {{ vhost }} RabbitMQ VHost:
rabbitmq_vhost.present:
- name: vhost
# Standard packages
{% for package in pillar["ci"]["packages"]["standards"] %}
Destination directory for {{ package }} should exists:
file.directory:
- name: C:\inetpub\wwwroot\{{ pillar['application_environment'] }}\{{ package }}
- makedirs: True
{% if salt["file.file_exists"]("C:\\inetpub\\wwwroot\\{application_environment}\\{package}".format(application_environment=pillar["application_environment"], package=package)) %}
Clean {{ package }}:
2018/08/30 10:31:58 [INFO] Terraform version: 0.11.8
2018/08/30 10:31:58 [INFO] Go runtime version: go1.10.3
2018/08/30 10:31:58 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.11.8/bin/terraform", "apply"}
2018/08/30 10:31:58 [DEBUG] Attempting to open CLI config file: /Users/mathieu.poussin/.terraformrc
2018/08/30 10:31:58 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/08/30 10:31:58 [INFO] CLI command args: []string{"apply"}
2018/08/30 10:31:58 [INFO] command: backend initialized: *gcs.Backend
2018/08/30 10:31:58 [DEBUG] checking for provider in "."
2018/08/30 10:31:58 [DEBUG] checking for provider in "/usr/local/Cellar/terraform/0.11.8/bin"
2018/08/30 10:31:58 [DEBUG] checking for provider in ".terraform/plugins/darwin_amd64"
sudo salt -C '( G@roles:backend and G@environment:staging )' --batch-size 50% --batch-wait 0 state.apply ci.deploy.app queue=True 'pillar={"ci": {"revision":"HEAD", "to_deploy": "all"}}'
Executing run on [u'bcn6-web-staging-1']
bcn6-web-staging-1:
----------
@kedare
kedare / main.py
Created February 20, 2019 09:41
py-ris-streamer.py
import json
import websocket
import pymongo
from pprint import pprint
# Mongo Connect
mongo = pymongo.MongoClient("mongodb://ris:ris@localhost:27017")
db = mongo.ris
collection = db.changes
<?php
unset($port_ifAlias);
echo $this_port['ifAlias'];
list($type_code, $first, $second, $third) = explode(":", $this_port['ifAlias']);
if ($type_code == "X") { $type = "peering"; } // IXP
elseif ($type_code == "P") { $type = "peering"; } // Peering
@kedare
kedare / dimmer.yaml
Created November 9, 2020 23:07
dimmer.yaml
alias: Dimmer bedroom turn off
description: ''
trigger:
- platform: device
domain: mqtt
device_id: 2eec03e07b54e1d6e15b9700393b8a0e
type: action
subtype: off-press
discovery_id: 0x0017880104f0716f action_off-press
condition: []
*.pyc
*.pyo
__pycache__/
tmp/
preview/