Last active
December 8, 2015 16:45
-
-
Save eykd/2fc7bb012290ed4fbec8 to your computer and use it in GitHub Desktop.
Demonstrating an unintentional recursive requisite when two states have the same `name`.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fileserver_backend: | |
- roots | |
file_client: local | |
file_roots: | |
base: | |
- /opt/salt | |
pillar_roots: | |
base: | |
- /srv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include: | |
- virtualenv | |
my-env: | |
virtualenv.managed: | |
- name: /opt/my-env | |
- cwd: /opt/my-env | |
- require: | |
- pip: virtualenv | |
pip-local: | |
pip.installed: | |
- name: pip | |
- upgrade: true | |
- bin_env: /opt/my-env | |
- cwd: /opt/my-env | |
- require: | |
- virtualenv: my-env | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip: | |
pip.installed: | |
- upgrade: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
start_seconds="$(date +%s)" | |
if [ ! -d "/etc/salt" ]; then | |
echo "Bootstrap salt" | |
wget -O install_salt.sh https://bootstrap.saltstack.com | |
sudo sh install_salt.sh -P git v2015.8.3 | |
fi | |
sudo cp /vagrant/minion.conf /etc/salt/minion | |
echo "Restart salt-minion" | |
sudo salt-minion -d | |
sudo service salt-minion restart | |
echo "Executing salt highstate (provisionning)" | |
sudo salt-call state.highstate | |
end_seconds="$(date +%s)" | |
echo "-----------------------------" | |
echo "Provisioning complete in "$(expr $end_seconds - $start_seconds)" seconds" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
base: | |
'*': | |
- my-env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.define :web do |web| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. | |
# Every Vagrant virtual environment requires a box to build off of. | |
web.vm.box = "ubuntu/trusty64" | |
# Share for masterless salt minion | |
web.vm.synced_folder "./", "/opt/salt" | |
web.vm.provision :shell, path: "provision_salt.sh", privileged: false | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include: | |
- pip | |
virtualenv: | |
pip.installed: | |
- upgrade: true | |
- require: | |
- pip: pip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment