Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change adds puppet agent support for AIX. Support is gated by the 'aix' operatingsystem fact and an archetecture fact matching 'PowerPC_POWER[5,6,7]'. This change uses the same strategy as osx for removing unused packages as aix doesn't have fully fledged package management for rpms.
- Loading branch information
mwbutcher
committed
Dec 18, 2015
1 parent
075bca1
commit 0c5747c
Showing
6 changed files
with
92 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# == Class puppet_agent::install::remove_packages_aix | ||
# | ||
# Sadly, special handling is required to clear up puppet_enterprise installation | ||
# on 3.8. | ||
# | ||
class puppet_agent::install::remove_packages_aix { | ||
assert_private() | ||
|
||
if $::puppet_agent::is_pe { | ||
# shutdown services | ||
service { 'pe-puppet': | ||
ensure => stopped, | ||
}-> | ||
service { 'pe-mcollective': | ||
ensure => stopped, | ||
}-> | ||
|
||
# remove old users and groups | ||
user { 'pe-puppet': | ||
ensure => absent, | ||
}-> | ||
user { 'pe-mcollective': | ||
ensure => absent, | ||
}-> | ||
|
||
# remove old /opt/puppet files | ||
file { '/opt/puppet': | ||
ensure => absent, | ||
force => true, | ||
backup => false, | ||
} | ||
|
||
[ | ||
'pe-augeas', | ||
'pe-ruby-augeas', | ||
'pe-openssl', | ||
'pe-ruby', | ||
'pe-facter', | ||
'pe-puppet', | ||
'pe-mcollective', | ||
'pe-hiera', | ||
'pe-libyaml', | ||
].each |$package| { | ||
exec { "remove ${package}": | ||
command => "/usr/bin/rpm -e --nodeps `rpm -qa | grep ${package}`", | ||
require => File['/opt/puppet'], | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
class puppet_agent::osfamily::aix( | ||
$package_file_name = undef, | ||
) { | ||
assert_private() | ||
|
||
class { 'puppet_agent::prepare::package': | ||
package_file_name => $package_file_name, | ||
} | ||
|
||
contain puppet_agent::prepare::package | ||
|
||
file { '/usr/local/bin/puppet': | ||
ensure => 'link', | ||
target => '/opt/puppetlabs/bin/puppet', | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters