Another strategy I use is to differentiate your dev VMs and production
machines using hostname patterns:
For exemple, in your Vagrantfile you can define a custom hostname:
config.vm.hostname = "foo-dev"
Then in your Salt top.ls file, you can apply different states for each
class of machine:
base:
'*':
- common
- stuff
'*-prod':
- prod_only
'*-dev':
- dev_only
Hope this helps,
--
Ronan Amicel
On Thu, Feb 26, 2015 at 8:06 AM, Chris Withers <[email protected]> wrote:
> Hi Ronan,
>
> On 25/02/2015 22:12, Ronan Amicel wrote:
>>
>> Hi,
>>
>> Maybe something like this.
>>
>> You could first tell vagrant not to run highstate:
>>
>> config.vm.provision :salt do |salt|
>> salt.run_highstate = false
>> end
>>
>> Then you could use a shell provisioner to run the chosen states:
>>
>> config.vm.provision "shell",
>> inline: "salt-call --local state.sls foo,bar"
>> end
>
>
> This was my thought too, it just feels a bit clunky.
>
>
> Chris
>
> --
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.