mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #24987 from heewa/fix-trying-to-cache-no-file
Don't try to cache a template when it's not a file
This commit is contained in:
commit
4af15cfb90
1 changed files with 3 additions and 2 deletions
|
@ -2799,8 +2799,9 @@ def get_managed(
|
|||
' source file {0}').format(source)
|
||||
|
||||
# if the file is a template we need to actually template the file to get
|
||||
# a checksum, but we can cache the template itselt
|
||||
if template:
|
||||
# a checksum, but we can cache the template itself, but only if there is
|
||||
# a template source (it could be a templated contents)
|
||||
if template and source:
|
||||
# check if we have the template cached
|
||||
template_dest = __salt__['cp.is_cached'](source, saltenv)
|
||||
if template_dest:
|
||||
|
|
Loading…
Add table
Reference in a new issue