Bug #1109

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

Added by Bryan McLellan almost 4 years ago. Updated almost 2 years ago.

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

0%

Category:language
Target version:0.24.6
Affected Puppet 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 over 3 years ago

  • Status changed from 1 to Accepted

Updated by Brice Figureau over 3 years ago

  • Affected Puppet 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 over 3 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