-
Notifications
You must be signed in to change notification settings - Fork 23
KB#0009 #6
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
KB#0009 #6
Conversation
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 think the header for the script needs changed to "#!/bin/bash" or this may not work in ubuntu.
In the main body of the script, I would remove the templated comment lines.
In the JSON file i would put the KB information also
The Travis build also has a few checks to complete
But looks good! Thanks
tasks/kb0009.sh
Outdated
FACTER_level="$loglevel" FACTER_service="$peservice" puppet apply -e "augeas {'toggle logging level': incl => \"/etc/puppetlabs/$::service/logback.xml\", lens => 'Xml.lns', context => \"/files/etc/puppetlabs/$::service/logback.xml/configuration/root/#attribute\", changes => \"set level \'$::level\'\"}~> service {\"pe-$::service\": ensure => running }" | ||
echo "Updated $peservice log level to $loglevel" | ||
|
||
elif [ -e "/etc/default/pe-puppetserver" ] # cover ubuntu |
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.
Is there any reason for differentiating between EL and Ubuntu for this task?
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.
@MartyEwings good catch on that, updated the json and .sh file.
@jarretlavallee There is no difference for this scenario, mainly for future maintainability should we need to add additional commands in which EL and Ubuntu might differ. But for now, I have updated the script. Thanks!
The Travis CI can't seem to interpret Task assigned variable $PT_xxx Any idea what to be done to pass this check?
|
@halimwi I think this may be because the task declares the env variable in the json file, and travis expects it in the script, ill see if some of the official modules with params work around this in some way. We may have to ignore this check or write some new rules |
@halimwi from googling i think for best practice if we do: declare (variable name) at the start of the script this should leave the contents intact but also clear this error |
@halimwi just to get the full picture on this we can declare in our scripts as we will always know the name of env variable as we set them in the json also maybe for future reference Note: This message only triggers for variables with lowercase characters in their name (foo and kFOO but not FOO) due to the standard convention of using lowercase variable names for unexported, local variables. so for these env variables we could use uppercase to circumvent this |
No description provided.