Skip to content

Instantly share code, notes, and snippets.

View jcockhren's full-sized avatar
👨‍🍳
Cooking up something 🔥

Jurnell Cockhren jcockhren

👨‍🍳
Cooking up something 🔥
View GitHub Profile
@jcockhren
jcockhren / salt-cloud-aws-alloutput.txt
Created September 8, 2013 23:29
salt-cloud aws action applied to instanceId fails. full output
[WARNING ] The function 'cloud_config()' defined in '/usr/local/lib/python2.7/dist-packages/saltcloud/config.py' is not yet using the new 'default_path' argument to `salt.config.load_config()`. As such, the 'SALT_CLOUD_CONFIG' environment variable will be ignored
[DEBUG ] Missing configuration file: /etc/salt/cloud
[DEBUG ] Reading configuration from /etc/salt/master
[WARNING ] The function 'cloud_providers_config()' defined in '/usr/local/lib/python2.7/dist-packages/saltcloud/config.py' is not yet using the new 'default_path' argument to `salt.config.load_config()`. As such, the 'SALT_CLOUD_PROVIDERS_CONFIG' environment variable will be ignored
[DEBUG ] Reading configuration from /etc/salt/cloud.providers
[WARNING ] The function 'vm_profiles_config()' defined in '/usr/local/lib/python2.7/dist-packages/saltcloud/config.py' is not yet using the new 'default_path' argument to `salt.config.load_config()`. As such, the 'SALT_CLOUDVM_CONFIG' environment variable will be ignored
[DEBUG ] Reading configurati
@jcockhren
jcockhren / salt-cloud-aws-alloutput-ec2-driver.txt
Created September 8, 2013 23:53
This shows the same issue appears even when using the ec2 driver.
[WARNING ] The function 'cloud_config()' defined in '/usr/local/lib/python2.7/dist-packages/saltcloud/config.py' is not yet using the new 'default_path' argument to `salt.config.load_config()`. As such, the 'SALT_CLOUD_CONFIG' environment variable will be ignored
[DEBUG ] Missing configuration file: /etc/salt/cloud
[DEBUG ] Reading configuration from /etc/salt/master
[WARNING ] The function 'cloud_providers_config()' defined in '/usr/local/lib/python2.7/dist-packages/saltcloud/config.py' is not yet using the new 'default_path' argument to `salt.config.load_config()`. As such, the 'SALT_CLOUD_PROVIDERS_CONFIG' environment variable will be ignored
[DEBUG ] Reading configuration from /etc/salt/cloud.providers
[WARNING ] The function 'vm_profiles_config()' defined in '/usr/local/lib/python2.7/dist-packages/saltcloud/config.py' is not yet using the new 'default_path' argument to `salt.config.load_config()`. As such, the 'SALT_CLOUDVM_CONFIG' environment variable will be ignored
[DEBUG ] Reading configurati
@jcockhren
jcockhren / sample_config
Created September 17, 2013 19:19
Does the below config even makes sense? using gitfs and ext_pillar, should the pillar repo have multiple branches? How do I use this to map to environments in salt?
ext_pillar:
- git: master git@bitbucket.org:userrepo/pillar.git
- git: dev git@bitbucket.org:userrepo/pillar.git
@jcockhren
jcockhren / pillar_gitfs
Last active December 23, 2015 07:19
This is all you need (in a master file) to get pillar working with gitfs. Note that "pillar_roots" aren't used.
fileserver_backend:
- git
gitfs_remotes:
- git@bitbucket.org:somerepogroup/salt-states.git
##### Pillar settings #####
##########################################
# Salt Pillars allow for the building of global data that can be made selectively
# available to different minions based on minion grain filtering. The Salt
@jcockhren
jcockhren / gist:6606998
Created September 18, 2013 09:57
Multi-VM vagrantfile with salt provisioning
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.synced_folder "salt/", "/srv/salt/"
config.vm.define :smaster do |smaster|
smaster.vm.network "private_network", ip: "192.168.50.4"
smaster.vm.network "forwarded_port", guest: 8001, host: 8001, auto_correct: true
smaster.vm.hostname = "devmaster"
smaster.vm.provision :salt do |salt|
@jcockhren
jcockhren / install.sls
Last active December 23, 2015 12:09 — forked from mech422/install.sls
##
## 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
@jcockhren
jcockhren / gist:6651307
Last active December 23, 2015 14:49
Error when bootstrapping minion in vagrant
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4759FA960E27C0A6
* INFO: Running config_salt()
* INFO: Running install_ubuntu_stable()
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
dctrl-tools debconf-utils libyaml-0-2 msgpack-python python-crypto
python-jinja2 python-m2crypto python-markupsafe python-pkg-resources
@jcockhren
jcockhren / core.sls
Last active February 16, 2016 22:32
Simple salt example. core.sls is in the same directory as top.sls (that's one way to designate a state file). monitoring state ID is defined in a FILE called "init.sls" in the "monitoring" subdirectory.
core:
pkg.installed:
- pkgs:
- htop
- vim-nox
- git-core
- zsh
- tmux
- git