Last active
August 29, 2015 14:08
-
-
Save bemosior/32fba80a11922abe3fdb to your computer and use it in GitHub Desktop.
IaC Development Workflow - Vagrantfile
This file contains hidden or 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
# Some of the adjusted Vagrantfile for context. | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "hashicorp/precise64" | |
# ... | |
# This will mount our salt code at `/srv` inside the VM. | |
config.vm.synced_folder "../", "/srv/" | |
# ... | |
## Use all the defaults: | |
config.vm.provision :salt do |salt| | |
# The minion config file is also inside the `vagrant` folder | |
salt.minion_config = "minion_config" | |
# Run the highstate on VM during the initial provisioning. | |
salt.run_highstate = true | |
# See the details. | |
salt.verbose = true | |
# Optional: We need a specific salt version for our environment. You might not. | |
salt.install_type = "git" | |
salt.install_args = "v2014.1.10" | |
# Optional: Specify vagrant-specific overrides. | |
# For example, our policies specify running the SSH daemon on a nonstandard port, | |
# but we want to override that for development purposes inside our Vagrant box. | |
# These pillars exist for any vagrant-initiated salt calls, whereas any internal | |
# calls (say, after SSHing in and running salt-call) will not be aware. | |
# You can (messily) get around this by also adding an `ext_pillar` stanza to the | |
# minion_config file and specifying a list item of `cmd_yaml: cat filename`, | |
# where `filename` is a yaml file with the same pillars as below. There's | |
# probably a better way. | |
salt.pillar({ | |
"sshd_config" => { | |
"Port" => 22 | |
} | |
}) | |
end | |
# ... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment