How to use Pelican on GitHub Pages 
Author: Josef Jezek
sudo apt-get install python-setuptools
*Pigs* | |
- Product Owner | |
- Team | |
- Scrum Master | |
*Chickens* | |
Stakeholders | |
Managers | |
*Sprint* |
## | |
## salt '*' grains.setval key val | |
## salt '*' grains.setval key "{'sub-key': 'val', 'sub-key2': 'val2'}" | |
## | |
{% set id = grains.id %} | |
{% set os = grains.os %} | |
{% set node_type = pillar.node_type %} | |
{% set node_role = pillar.node_role %} | |
{% set key = id + '-sls-base-nginx-_action' %} |
Yes, this is a contrived example just to show off what I'm talking about... | |
init.sls ( I used /base/be_cool/init.sls) | |
======== | |
do_something_cool: | |
cmd.run: | |
- unless: '[[ -e /tmp/dsc.no_run ]]' | |
- name: echo 'done' > /tmp/dsc.log && touch /tmp/dsc.report && true |
Author: Josef Jezek
sudo apt-get install python-setuptools
http://pcottle.github.io/learnGitBranching/ | |
http://rogerdudler.github.io/git-guide/ | |
http://think-like-a-git.net/ | |
http://gitimmersion.com/ | |
http://gitref.org/ | |
http://git-scm.com/documentation |
from django.core.cache import cache | |
from django.http import HttpResponseForbidden | |
from functools import wraps | |
from django.utils.decorators import available_attrs | |
def ratelimit(limit=10,length=86400): | |
""" The length is in seconds and defaults to a day""" | |
def decorator(func): | |
def inner(request, *args, **kwargs): | |
ip_hash = str(hash(request.META['REMOTE_ADDR'])) |
Coming from puppet I really got used to the hierarchical data structure hiera
provides. It's easy to use, yet pretty powerful when used in combination with the module_data
puppet module, which allows you to put your hiera-data in the module directory itself, while still being able to globally override stuff from the main hiera source.
The approach I present here allows you to do something similar with salt
and it's pillar
data by using Jinja2
only. No additional modules whatsoever are required for this to work.
Configuration data is being split up into four levels:
homeassistant: | |
pip.installed: | |
- bin_env: '/usr/bin/pip3' | |
python3-pip: | |
pkg.installed | |
cython3: | |
pkg.installed |