Browse Source

Allow any logdest

Puppet's logdest option can also point to a file, so allow any
string through here.

Change-Id: I36fc99fa7e6169463acd24a5a6f4b54cf23849b7
James E. Blair 2 years ago
parent
commit
1a20bc89eb
No account linked to committer's email address
1 changed files with 3 additions and 5 deletions
  1. 3
    5
      library/puppet

+ 3
- 5
library/puppet View File

@@ -72,7 +72,6 @@ options:
72 72
       - Where the puppet logs should go, if puppet apply is being used
73 73
     required: false
74 74
     default: stdout
75
-    choices: [ 'stdout', 'syslog' ]
76 75
     version_added: "2.1"
77 76
 requirements: [ puppet ]
78 77
 author: "Monty Taylor (@emonty)"
@@ -119,8 +118,7 @@ def main():
119 118
             puppetmaster=dict(required=False, default=None),
120 119
             manifest=dict(required=False, default=None),
121 120
             logdest=dict(
122
-                required=False, default='stdout',
123
-                choices=['stdout', 'syslog']),
121
+                required=False, default='stdout'),
124 122
             show_diff=dict(
125 123
                 # internal code to work with --diff, do not use
126 124
                 default=False, aliases=['show-diff'], type='bool'),
@@ -195,10 +193,10 @@ def main():
195 193
             cmd += " --no-noop"
196 194
     else:
197 195
         cmd = "%s apply --detailed-exitcodes " % base_cmd
198
-        if p['logdest'] == 'syslog':
199
-            cmd += "--logdest syslog "
200 196
         if p['show_diff']:
201 197
             cmd += "--show_diff "
198
+        if p['logdest'] != 'stdout':
199
+            cmd += "--logdest %s " % p['logdest']
202 200
         if p['environment']:
203 201
             cmd += "--environment '%s' " % p['environment']
204 202
         if module.check_mode:

Loading…
Cancel
Save