Skip to content
This repository has been archived by the owner on May 25, 2020. It is now read-only.

Commit

Permalink
Merge pull request #10 from aharden/1.2.7
Browse files Browse the repository at this point in the history
1.3.0 release items
  • Loading branch information
aharden committed Nov 20, 2015
2 parents eb0e395 + 3f84c53 commit b0adc86
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 25 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 2015-11-20 - Version 1.3.0

New Feature:
* curl_path parameter for AIX (doesn't support wget with SSL)

Bugfix:
* Moved all wget::fetch calls to use TLSv1 since that's what Puppet Enterprise defaults to

## 2015-11-11 - Version 1.2.6

Bugfix:
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ Path to the puppet.conf file. Defaults:
* Unix/Linux: `/etc/puppetlabs/puppet/puppet.conf`
* Windows: `${appdata}/PuppetLabs/puppet/etc/puppet.conf`

####`curl_path`

Path to the curl binary (AIX only). Defaults to `/usr/bin/curl`

####`ensure`

Default setting: 'present'
Expand Down
2 changes: 2 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#
class puppet_ent_agent (
$config = $puppet_ent_agent::params::config,
$curl_path = $puppet_ent_agent::params::curl_path,
$ensure = $puppet_ent_agent::params::ensure,
$master = $puppet_ent_agent::params::master,
$agent_server = $puppet_ent_agent::params::agent_server,
Expand All @@ -30,6 +31,7 @@
) inherits puppet_ent_agent::params {

validate_absolute_path($config)
validate_absolute_path($curl_path)
validate_string($ensure)
validate_string($master)
validate_string($agent_server)
Expand Down
54 changes: 30 additions & 24 deletions manifests/install/nix.pp
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
# Download bash script from pe_repo and run it
class puppet_ent_agent::install::nix {
$master = $::puppet_ent_agent::master
$staging_dir = $::puppet_ent_agent::staging_dir
$version = $::puppet_ent_agent::ensure
$curl_path = $::puppet_ent_agent::curl_path
$master = $::puppet_ent_agent::master
$staging_dir = $::puppet_ent_agent::staging_dir
$version = $::puppet_ent_agent::ensure
$install_file = "${staging_dir}/install.bash"
$install_cmd = "/bin/bash -e ${install_file}"
$source = "https://${master}:8140/packages/${version}/${::platform_tag}.bash"

include wget

case $::osfamily {
'AIX': {
$group = 'system'
}
'Redhat': {
$group = 'root'
if ($::operatingsystemmajrelease == 5) {
$wgetflags = ['--secure-protocol=TLSv1']
}
else {
$wgetflags = ''
}
$group = 'system'
$use_curl = true
}
default: {
$group = 'root'
$group = 'root'
$use_curl = false
}
}

Expand All @@ -33,16 +30,25 @@
mode => '0755',
}

wget::fetch { 'download PE agent install.bash':
source => "https://${master}:8140/packages/${version}/${::platform_tag}.bash",
destination => "${staging_dir}/install.bash",
timeout => 0,
redownload => true,
verbose => false,
flags => $wgetflags,
nocheckcertificate => true,
} ->
exec { "/bin/bash -e ${staging_dir}/install.bash":
if $use_curl {
exec { "${curl_path} -1 -sLo \"${install_file}\" \"${source}\"":
user => 'root',
before => Exec[$install_cmd],
}
} else {
wget::fetch { 'download PE agent install.bash':
source => $source,
destination => $install_file,
timeout => 0,
redownload => true,
verbose => false,
flags => ['--secure-protocol=TLSv1'],
nocheckcertificate => true,
before => Exec[$install_cmd],
}
}

exec { $install_cmd:
user => 'root',
}
}
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#
class puppet_ent_agent::params {
$config = "${::puppet_confdir}/puppet.conf"
$curl_path = '/usr/bin/curl'
$ensure = 'present'
$master = $::settings::server
$agent_server = undef
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aharden-puppet_ent_agent",
"version": "1.2.6",
"version": "1.3.0",
"author": "aharden",
"summary": "Management of Puppet Enterprise agent.",
"license": "Apache-2.0",
Expand Down

0 comments on commit b0adc86

Please sign in to comment.