puppet-archive

345 views
Skip to first unread message

Ryan Vande

unread,
Apr 3, 2017, 10:42:56 AM4/3/17
to Puppet Users
I posted this in slack puppet community, lets see if I can get more ideas here

I have the following setup

when puppet runs on the agent puppet node, no errors happen but nothing else happens either, have a look please

Im using Puppet Archive for the following

Puppetfile:
mod 'puppet-archive', '1.3.0'
mod 'puppetlabs-stdlib', '4.16.0'


hieradata/global.yaml:
artifactory_host: artifactory.azcender.com
tripwire::wintripdir: 'c://temp'


Profile:

include ::archive
archive {"${windir}/te_agent_8.4.2_en_windows_x86_64.zip" :
  ensure        => present,
  source        => "http://${artifactory_host}/artifactory/application-release-local/gov/usda/fs/busops/cio/Tripwire/te_agent_8.4.2_en_windows_x86_64.zip",
  extract       => true,
  extract_path  => $windir,
  creates       => $windir,
  cleanup       => false,


Puppet agent runs on the puppet node without error but nothing happens , meaning no files are uploaded and extracted to the node
Any assistance is much appreciated

Luke Bigum

unread,
Apr 3, 2017, 10:49:59 AM4/3/17
to Puppet Users

creates       => $windir,


^^^  I'm fairly certain that this resource won't run if that file exists, which is most likely a directory (and does exist). I'd say it has to be this:


  creates       => "${windir}/te_agent_8.4.2_en_windows_x86_64.zip"

Luke Bigum

unread,
Apr 3, 2017, 10:53:46 AM4/3/17
to Puppet Users
Actually no, it's going to need to be some file that's inside the ZIP archive, not the name of the ZIP archive itself. You get the idea though.

Ryan Vande

unread,
Apr 3, 2017, 11:53:44 AM4/3/17
to Puppet Users
Can you explain further?

As of now, if I dont manually create ${windir}/te_agent_8.4.2_en_windows_x86_64 which is actually c:\temp\te_agent_8.4.2_en_windows_x86_64 it blows up but creates never creates it otherwise

If I manual create the directories, the puppet cycle goes without error but the zip is never created/extracted to c:\temp\te_agent_8.4.2_en_windows_x86_64

Luke Bigum

unread,
Apr 3, 2017, 12:05:00 PM4/3/17
to Puppet Users
From the docs at https://github.com/voxpupuli/puppet-archive#reference (Resources -> Archive section):

  creates: if file/directory exists, will not download/extract archive.

If you've got a creates parameter with the value of ${windir} (which for you is C:\temp\) then the archive resource won't do anything if C:\temp\ exists. On a Windows machine I believe there's a very good chance that will always exist, hence why your archive is not doing anything.

The creates flag is there to stop the archive resource from running over and over again; it specifies a file that will exist AFTER you've downloaded and extracted your archive.  Think of it as a conditional to do work or not do work.

I've downloaded /te_agent_8.4.2_en_windows_x86_64.zip and looked inside. I would suggest you try this parameter:

  creates => "${windir}/te_agent_8.4.2_en_windows_x86_64/te_agent.msi"

-Luke

Ryan Vande

unread,
Apr 3, 2017, 12:05:18 PM4/3/17
to Puppet Users
I think I know what you mean if c:\te_agent_8.4.2_en_windows_x86_64 oh nvm i get what your saying there is an msi inside the zip so I want it to creates = {dir}\flename.msi
Reply all
Reply to author
Forward
0 new messages