Ask Your Question

Syntax error at '}'; expected '}'

asked 2017-03-28 11:49:47 -0500

rahvee gravatar image

Trying to understand why this is a syntax error:

  if $manage_home == true {
    User[$title] -> File["${title}_home"] -> File["${title}_sshdir"]
  else {
    User[$title]   # This is the problem line

I get the following error: Syntax error at '}'; expected '}' Don't understand what's wrong here...

edit retag flag offensive close merge delete


Looking at it I don't know what User[$title] is doing by itself.

puser gravatar imagepuser ( 2017-03-28 12:50:31 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-03-28 16:15:11 -0500

rahvee gravatar image

Got it - The intent was if $manage_home is set, then User -> File -> File to create the user, then homedir, then sshdir, but if $manage_home is not set, then User to just create the user. I understand now, that User[$title] all by itself doesn't do anything (and hence syntax error). I understand now that the User -> File -> File line also doesn't do anything; it just sets up the relationships between those items that are declared elsewhere.

edit flag offensive delete link more


Correct! The only place something similar to that would be used would be a resource collector if you needed to realize virtual resources.

DarylW gravatar imageDarylW ( 2017-03-29 08:27:17 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-03-28 11:49:47 -0500

Seen: 40 times

Last updated: Mar 28