-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Aix support #176
base: master
Are you sure you want to change the base?
Add Aix support #176
Conversation
* Previously this module kinda supported AIX but had a few issues. This code adds better support and allows the user to control how the rsyslog package is installed and where from. AIX is still considered experimental but it works on several systems tested.
rsyslog::switch_default_syslog: true | ||
# you will need to fill the source out | ||
# aix has no yum like service | ||
rsyslog::package_source: '<package_location>' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have a real value like /opt/freeware/src/packages
or /tmp
so that the module can be tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is possible, because it is up to the user to put the file on the system. It could be on nfs or any other directory and is up to the user to specify where that is. I could just put /tmp but this will likely be wrong for the user but I suppose the way it is now is also wrong.
if $rsyslog::switch_default_syslog { | ||
# Manage package must be set to true | ||
# For AIX only | ||
exec{'switch_to_rsyslog': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style nit:
exec { 'switch_to_rsyslog':
Stdlib::Filemode $conf_permissions = '0644', | ||
Stdlib::Filemode $confdir_permissions = '0755', | ||
Stdlib::Filemode $global_conf_perms = $conf_permissions, | ||
String $owner_name = 'root', | ||
String $group_name = 'root', | ||
Boolean $switch_default_syslog = false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest removing this param as it would only be used by AIX
@@ -43,6 +44,17 @@ | |||
} | |||
} | |||
|
|||
if $rsyslog::switch_default_syslog { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of this param which calls an exec that only makes sense on AIX, suggest conditional logic based off of the platform such as
if $facts['os']['name'] == 'AIX' {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I change to your suggestion it would mean that the following command would run every puppet run trying to do a idempotent check: odmget -q \"subsysname = 'syslogd'\" SRCsubsys | grep rsyslog
. This is not a desirable behavior.
Additionally, some users want this module to install rsyslog but also want to control when syslog is changed over to rsyslog. AFAIK, rsyslog is not the default for AIX.
I did update to use if $rsyslog::switch_default_syslog and $::facts['os']['name'] == 'AIX' {
to prevent any accidental usage from non AIX systems.
Great work Corey! In the spec tests as https://github.com/voxpupuli/puppet-rsyslog/blob/master/spec/classes/init_spec.rb you should add a conditional so that if the platform is AIX it checks for that exec to be in there and if not then the exec is absent. |
Dear @logicminds, thanks for the PR! This is Vox Pupuli Tasks, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase? You can find my sourcecode at voxpupuli/vox-pupuli-tasks |
few issues. This code adds better support and allows
the user to control how the rsyslog package is installed
and where from. AIX is still considered experimental but
it works on several systems tested.