Skip to content

fileclient: Add function to return the expected cache location#52305

Merged
dwoz merged 2 commits into
saltstack:developfrom
terminalmage:cp.cache_dest
Apr 1, 2019
Merged

fileclient: Add function to return the expected cache location#52305
dwoz merged 2 commits into
saltstack:developfrom
terminalmage:cp.cache_dest

Conversation

@terminalmage

@terminalmage terminalmage commented Mar 25, 2019

Copy link
Copy Markdown
Contributor

For use cases in which a file must be cached (using the file.cached
state) and then acted on in the same salt run, using cp.is_cached to
get the cache location of the file won't work since jinja is evaluated
before the states are are run. This commit adds a function to the
fileclient, as well as an interface to that function in the cp module,
which can be used in jinja to stand in for the location of the cached
file.

For use cases in which a file must be cached (using the `file.cached`
state) and then acted on in the same salt run, using `cp.is_cached` to
get the cache location of the file won't work since jinja is evaluated
before the states are are run. This commit adds a function to the
fileclient, as well as an interface to that function in the `cp` module,
which can be used in jinja to stand in for the location of the cached
file.
@dwoz
dwoz merged commit 1bf25a1 into saltstack:develop Apr 1, 2019
xeacott pushed a commit to xeacott/salt that referenced this pull request Apr 21, 2020
@sagetherage sagetherage added the has master-port port to master has been created label Apr 23, 2020
dwoz added a commit that referenced this pull request May 7, 2020
@terminalmage
terminalmage deleted the cp.cache_dest branch February 13, 2024 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-jam has master-port port to master has been created

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants