Skip to content

Commit

Permalink
use lwf/remote_file to download
Browse files Browse the repository at this point in the history
  • Loading branch information
nate st. germain committed Oct 17, 2019
1 parent ed1cd8f commit d5f6a60
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
$disable_auditd = $::threatstack::params::disable_auditd,
$disable_auditd_cmd = $::threatstack::params::disable_auditd_cmd,
$windows_download_url = $::threatstack::params::download_url,
$windows_tmp_path = $::threatstack::params::tmp_path,
$windows_ts_package = $::threatstack::params::ts_package,
$windows_install_options = ["TSDEPLOYKEY=${deploy_key}"]

Expand Down
9 changes: 8 additions & 1 deletion manifests/package.pp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,17 @@
# installation and upgrades.
case $facts['os']['family'] {
'Windows': {
remote_file { 'agent msi download':
ensure => present,
path => $::threatstack::windows_tmp_path
source => $::threatstack::windows_download_url
}

package { $::threatstack::ts_package:
ensure => installed,
source => $::threatstack::windows_download_url,
source => $::threatstack::windows_tmp_path
install_options => $::threatstack::windows_install_options
require => Remote_file['agent msi download']
}
}
default: {
Expand Down
4 changes: 2 additions & 2 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
$gpg_key = undef
$disable_auditd = false
$disable_auditd_cmd = undef
$windows_base_url = 'https://pkg.threatstack.com/v2/Windows'
$windows_base_url = "https://pkg.threatstack.com/v2/Windows"
$windows_pkg_name = 'Threat+Stack+Cloud+Security+Agent.latest.msi'
$download_url = "${windows_base_url}/${windows_pkg_name}"
$progdir = 'C:V\\Program Files\\Threat Stack'
$tmp_path = "C:\\Windows\\Temp\\${windows_pkg_name}"
}
'RedHat': {
$repo_class = '::threatstack::yum'
Expand Down
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"tags": ["threatstack"],
"dependencies": [
{ "name": "puppetlabs/stdlib", "version_requirement": ">= 4.2.2" },
{"name": "puppetlabs/apt", "version_requirement": ">= 6.2.1"}
{"name": "puppetlabs/apt", "version_requirement": ">= 6.2.1"},
{"name": "lwf/remote_file", "version_requirement": ">= 1.1.3"}
],
"operatingsystem_support": [
{
Expand Down

0 comments on commit d5f6a60

Please sign in to comment.