puppetlabs-toy-chest / puppetlabs-package_updates

Package update discovery Puppet Face and custom Facter fact
12 stars 6 forks source link

Add ability to execute some command before the cron scheduled command #21

Closed fduranti closed 7 years ago

fduranti commented 7 years ago

Related to issue #20 Add an Array $precommand containing commands to execute before executing the cron command. With those pre-command is possible to setup the proxy this way:

  $proxy_command=["export http_proxy=${::proxy_server}",
    "export https_proxy=${::proxy_server}",
    "export no_proxy=${::no_proxy}"
  ]
  class {'::package_updates' :
    precommand => $proxy_command,
    schedule   => 'daily',
    minute     => 0,
    hour       => 3,
    month      => 'all',
    monthday   => 'all',
    weekday    => 'all',
  }
ccaum commented 7 years ago

Thanks, @fduranti. This looks good, but could you update the README to document how to use this and what its limitations are (such as only working w/ certain package managers)?

fduranti commented 7 years ago

@ccaum ok tomorrow I'll try to update the README file and.

fduranti commented 7 years ago

@ccaum I've added a small documentation of the parameter added.