Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow running something else than state.highstate #202

Open
avanier opened this issue Jan 25, 2018 · 6 comments
Open

Allow running something else than state.highstate #202

avanier opened this issue Jan 25, 2018 · 6 comments
Milestone

Comments

@avanier
Copy link
Contributor

avanier commented Jan 25, 2018

It would be handy to able to test only a specific state.

I have an idea of how to do this, so PR incoming at some point.

The work starts here-ish~.

 cmd << sudo("#{salt_call} --state-output=changes --config-dir=#{File.join(config[:root_path], salt_config_path)} --local state.highstate") # <--- Worky, worky...
@gtmanfred
Copy link
Contributor

probably best to just do a state.apply for both, and then populate a list called sls that gets added if something is actually there.

The problem with not using a highstate, is any modules may not be synced, i can't remember if dynamic modules are synced on the minion starting up, but i know they aren't synced for state.sls, so I would like to see an option added around syncing all, (since refresh def happens with salt-call), and then also add a test to the suite to test that feature.

@gtmanfred gtmanfred added this to the Approved milestone Jan 25, 2018
@avanier
Copy link
Contributor Author

avanier commented Jan 25, 2018

I keep making those discoveries about Salt. I'm really a Chef user stuck in a Salt world right now.

Thanks for the heads-up / plan. I'll dig and report.

@avanier
Copy link
Contributor Author

avanier commented Jan 25, 2018

Thanks again for this info, this just saved me a lot of trouble for something else altogether. Also, part of the answers we seek are here.

@gtmanfred
Copy link
Contributor

correct, you could optionally just have a sync: section that people could put in the different things to sync, like grains or modules or potentially just set it to true or all and it will do that.

@zachsmorgan
Copy link

zachsmorgan commented May 16, 2018

I think it would be worth having a configuration option to override the salt-apply command / args.

See #236

@zachsmorgan
Copy link

Just to bring this full circle, I ended up switching to the shell provisioner. I don't think I had thought the ramifications for my PR through before submitting, so, sorry for the extra noise. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants