0

I try to download a tar.gz file and uncompress it on /tmp/apps. However i don't want to uncompress it if the directory already exists. If the file exists or even doesn't exist it is downloaded and uncompressed. I cant find my code is missing a parameters on my exec block or if I made a mistake somewhere else.

I'm using Puppet 3.8.

Gist file of my puppet

Thomas Dondorf
  • 23,416
  • 6
  • 84
  • 105
morla
  • 675
  • 4
  • 15
  • 32
  • 1
    We can advise you only about code you present in the question itself. However, I suppose you're using an `exec` resource, so you should look into the `creates` parameter provided by that resource type, and maybe `onlyif` and `unless` as well. – John Bollinger Jun 08 '19 at 14:23

1 Answers1

0

Use the puppet/archive module, https://forge.puppet.com/puppet/archive. It will download the archive, check for existing files and even tidy up after itself.

Jon
  • 3,573
  • 2
  • 17
  • 24