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

Feature request for saltutil.synced_all and related state modules #45264

Closed
boltronics opened this issue Jan 4, 2018 · 5 comments
Closed

Feature request for saltutil.synced_all and related state modules #45264

boltronics opened this issue Jan 4, 2018 · 5 comments
Labels
Core relates to code central or existential to Salt Feature new functionality including changes to functionality and code refactors, etc. State-Module
Milestone

Comments

@boltronics
Copy link
Contributor

boltronics commented Jan 4, 2018

Description of Issue/Question

Currently if I need to sync custom states, modules, grains, etc. and have that triggered from a state sls, I need to wrap the request in a module.run block. This has the disadvantage of triggering a system "change" every time that state sls executes, even if everything was already in sync.

I feel this is a common (possibly the most common) use case for using module.run, but it's far from ideal.

Setup

I would like to replace something like:

update_all:
  module.run:
    - saltutil.sync_all:
      - refresh: True

(assuming use_superseded for module.run is in play) with:

update_all:
  saltutil.synced_all:
    - reload_modules: True

The output would ideally show only modules that needed to be synced, or otherwise indicate no changes were necessary to the system. I would expect saltutil.synced_modules, saltutil.synced_states, etc. be implemented similarly.

Steps to Reproduce Issue

N/A

Versions Report

Not implemented as of Salt 2017.7.2 (Nitrogen).

@Ch3LL
Copy link
Contributor

Ch3LL commented Jan 4, 2018

I think this is a great idea. We are more than willing to accept a PR for this if you want to give it a go

@Ch3LL Ch3LL added Feature new functionality including changes to functionality and code refactors, etc. Core relates to code central or existential to Salt State-Module labels Jan 4, 2018
@Ch3LL Ch3LL added this to the Approved milestone Jan 4, 2018
@boltronics
Copy link
Contributor Author

Thanks. I'd be happy to give it a go when I find enough free time. Probably not any time soon though, so equally happy if someone else beats me to it. 😉

@max-arnold
Copy link
Contributor

@boltronics The linked PR was merged. Perhaps this issue could be closed?

@boltronics
Copy link
Contributor Author

@max-arnold Sorry I didn't notice this previously. It looks like @mchugh19 has done wonderful work. Thanks!

I don't believe I have privileges to do so, but I'm happy for this to be closed.

@boltronics
Copy link
Contributor Author

Oh I do. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core relates to code central or existential to Salt Feature new functionality including changes to functionality and code refactors, etc. State-Module
Projects
None yet
Development

No branches or pull requests

3 participants