Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

unless statement

Hi,

I'm trying to write a unless statement like below. But it's giving syntax error near '==' during the agent run. I'm using puppet 2.6.

class usermanage { unless $facts['userstat'] == "enabled" { user { 'test': ensure => present, ..... } } }

Please let me know what's wrong in my class or any other alternative way to get this done.

Thank you.

click to hide/show revision 2
None

unless statement

Hi,

I'm trying to write a unless statement like below. But it's giving syntax error near '==' during the agent run. I'm using puppet 2.6.

class usermanage user_manage { 
 unless $facts['userstat'] $facts['user_stat'] == "enabled" {
{   
    user { 'test':
       ensure => present,
              .....
 }
  }
}
}

Please let me know what's wrong in my class or any other alternative way to get this done.

Thank you. you.