summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@redhat.com>2016-09-16 12:34:08 -0700
committerMonty Taylor <mordred@inaugust.com>2016-10-01 08:11:12 -0700
commit1a20bc89ebfd11fef6697be8ca87410be8960d66 (patch)
tree0c0f11208fe129e7280dc76e9c8dc01226b49a96
parente46f449ca52303184523f98281d308486e30cd6c (diff)
Allow any logdest
Puppet's logdest option can also point to a file, so allow any string through here. Change-Id: I36fc99fa7e6169463acd24a5a6f4b54cf23849b7
Notes
Notes (review): Code-Review+2: Clark Boylan <cboylan@sapwetik.org> Code-Review+2: Paul Belanger <pabelanger@redhat.com> Code-Review+2: Spencer Krum <nibz@spencerkrum.com> Workflow+1: James E. Blair <corvus@inaugust.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 04 Oct 2016 21:18:05 +0000 Reviewed-on: https://review.openstack.org/371764 Project: openstack-infra/ansible-role-puppet Branch: refs/heads/master
-rw-r--r--library/puppet8
1 files changed, 3 insertions, 5 deletions
diff --git a/library/puppet b/library/puppet
index 0823656..912efdc 100644
--- a/library/puppet
+++ b/library/puppet
@@ -72,7 +72,6 @@ options:
72 - Where the puppet logs should go, if puppet apply is being used 72 - Where the puppet logs should go, if puppet apply is being used
73 required: false 73 required: false
74 default: stdout 74 default: stdout
75 choices: [ 'stdout', 'syslog' ]
76 version_added: "2.1" 75 version_added: "2.1"
77requirements: [ puppet ] 76requirements: [ puppet ]
78author: "Monty Taylor (@emonty)" 77author: "Monty Taylor (@emonty)"
@@ -119,8 +118,7 @@ def main():
119 puppetmaster=dict(required=False, default=None), 118 puppetmaster=dict(required=False, default=None),
120 manifest=dict(required=False, default=None), 119 manifest=dict(required=False, default=None),
121 logdest=dict( 120 logdest=dict(
122 required=False, default='stdout', 121 required=False, default='stdout'),
123 choices=['stdout', 'syslog']),
124 show_diff=dict( 122 show_diff=dict(
125 # internal code to work with --diff, do not use 123 # internal code to work with --diff, do not use
126 default=False, aliases=['show-diff'], type='bool'), 124 default=False, aliases=['show-diff'], type='bool'),
@@ -195,10 +193,10 @@ def main():
195 cmd += " --no-noop" 193 cmd += " --no-noop"
196 else: 194 else:
197 cmd = "%s apply --detailed-exitcodes " % base_cmd 195 cmd = "%s apply --detailed-exitcodes " % base_cmd
198 if p['logdest'] == 'syslog':
199 cmd += "--logdest syslog "
200 if p['show_diff']: 196 if p['show_diff']:
201 cmd += "--show_diff " 197 cmd += "--show_diff "
198 if p['logdest'] != 'stdout':
199 cmd += "--logdest %s " % p['logdest']
202 if p['environment']: 200 if p['environment']:
203 cmd += "--environment '%s' " % p['environment'] 201 cmd += "--environment '%s' " % p['environment']
204 if module.check_mode: 202 if module.check_mode: