Skip to content

Commit af4672c

Browse files
committed
Convert logfile to bool in if statement
If statement requires boolean and logfile was passed as string. Added str2bool function to convert logfile to boolean in if statement when testing if logfile and syslog are defined.
1 parent 2475a37 commit af4672c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

manifests/init.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
# Logging to syslog and file are mutually exclusive
4646
# Fail if both options are defined
47-
if $syslog and $logfile {
47+
if $syslog and str2bool("$logfile") {
4848
fail 'Define either syslog or logfile as logging destinations but not both.'
4949
}
5050

0 commit comments

Comments
 (0)