1

I have an archive on my master and want to extract it on the minion. For this it is fine I use :

  archive.extracted:
    - name:  'c:\PACKAGE'
    - source: salt://myfile.zip
    - archive_format: zip
    - enforce_toplevel: False
    - failhard: True

the problem is that I need to apply jinja template on some files of the zip file content.

But there is no template property on archive.extracted and I can't find a way to apply jinja template after it is extracted on minion server...

any idea ?

1

There is no much choices regarding your situation, I see two of them :

  1. You ask your dev dpt to add your jinja templating to their builds (which may be hard or even impossible)
  2. You can use salt module such as file.append or file.replace to add / replace your jinja code inside (this is not very clean that's the least we can say)

If you'd share an example that may help us to give some good advice

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.