Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>{{title}}</title>
</head>
<body>
<div id="intro-container">
interfaces:
file.managed:
- name: /etc/network/interfaces
- source: salt://network/interfaces
- template: jinja
hosts:
file.managed:
- name: /etc/hosts
- source: salt://hosts/hosts
@cilkay
cilkay / gist:d3652ef062cecf50d3166ecab41f1412
Last active May 24, 2016 19:29
Attempting to set DEBUG to True or False in Django application depending on current_env
## In djconfig.init, I have:
{% if grains['current_env'] == 'dev' or grains['current_env'] == 'qa' %}
{% set debug_status = True %}
{% else %}
{% set debug_status = False %}
{% endif %}
django_local_settings:
file.managed:
# Contents of pillar/mssql/init.sls
# I can connect to some-remote-host with the credentials below
# freetds-common and python-pymssql are both installed
maint:
mssql.server: some-remote-host
mssql.port: 1433
mssql.user: maint_user
mssql.password: some-password
mssql.database: ''
@cilkay
cilkay / datasources.json
Created January 28, 2016 22:53
This is a JSON configuration file for LoopBack. The intention of determining whether the database exists or not is to either create it if does not via LoopBack's autoMigrate() function and update it if does via LoopBack's autoUpdate() function.
{
"db": {
"connector": "memory",
"name": "db"
},
"mctAudit": {
"connector": "mssql",
"port": "{{ grains['audit_dbms_port'] }}",
"host": "{{ grains['audit_dbms_hostname'] }}",
"database": "{{ grains['audit_dbms_db'] }}",