0

Is there a way I can use the salt provisioner to run only a handful of states rather than doing a full highstate?

Our full highstate does a bunch of stuff that doesn't make sense for an ephemperal development VM, and in fact, a lot of which just won't work.

Chris Withers
  • 10,837
  • 4
  • 33
  • 51

1 Answers1

0

The plugin itself only currently supports running a full highstate.

As a workaround, 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
Daniel Baird
  • 2,239
  • 1
  • 18
  • 24
Chris Withers
  • 10,837
  • 4
  • 33
  • 51