Bug #1109

if/else blocks with only a comment in the if section fail

Added by Bryan McLellan over 2 years ago. Updated 3 months ago.

Status:Closed Start:
Priority:Normal Due date:
Assigned to:Puppet Community % Done:

0%

Category:language
Target version:0.24.6
Affected version:0.24.4 Branch:
Keywords:
Votes: 0

Description

  $is_vmware = tagged('vmware-guest')
  if $is_vmware {
    # debug(" vmware module handles time sync for guests")
  } else {
    include ntp::client
  }

produces:

Could not parse for environment development: Syntax error at '}'; expected '}' at puppet/manifests/site/base.pp:32

where:

  $is_vmware = tagged('vmware-guest')
  if $is_vmware {
    debug(" vmware module handles time sync for guests")
  } else {
    include ntp::client
  }

works

History

Updated by Redmine Admin about 2 years ago

  • Status changed from 1 to Accepted

Updated by Brice Figureau almost 2 years ago

  • Affected version set to 0.24.4

btm wrote:

[…] produces: […] where: […] works

Although this is won’t be as needed as before with 0.24.6 (because of the if expression thing), I’m offering here a patch available here: http://github.com/masterzen/puppet/tree/tickets%2F0.24.x%2F1109

Updated by James Turnbull almost 2 years ago

  • Status changed from Accepted to Closed
  • Target version set to 0.24.6

Pushed in commit:“0c297be5dad784e305ef194cee29b11a92d31b6b” in branch 0.24.x

Also available in: Atom PDF