summaryrefslogtreecommitdiff
path: root/manifests/rule.pp
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2017-02-01 21:42:50 -0500
committerMicah Anderson <micah@riseup.net>2017-02-01 21:42:50 -0500
commit0cd2a305f7fd9ba830a1fa3de25428ffa71d39f7 (patch)
tree1fb0b8dbe2bb034d46bd455eac713cbcbac42783 /manifests/rule.pp
parentb140aabf7c4e0a0ded0a69368c4fce354c1f96e8 (diff)
Fix fact for when shorewall is not yet installed.
When a node has puppet run for the first time, shorewall may not be installed. In that case there are a few problems that appear in puppet4: 1. Warning: Facter: Could not retrieve fact='shorewall_major_version', resolution='<anonymous>': undefined method `split' for nil:NilClass This is because running 'shorewall version' fails and so results in a nil, and the split cannot be done on a nil. That is solved by first running the 'shorewall version' and setting a variable. If that variable is not nil, then we can split off of that 2. Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, 'versioncmp' parameter 'a' expects a String value, got Undef This happens because the shorewall_version is set to Undef, but we need to have it set to a String. So we set the variable to '-1' if it is not installed.
Diffstat (limited to 'manifests/rule.pp')
0 files changed, 0 insertions, 0 deletions