Ask Your Question

Hiera error 400 malformed string in module1/manifests/init.pp

asked 2014-03-11 08:56:29 -0600

wuma1002 gravatar image

updated 2014-03-17 15:10:09 -0600

Stefan gravatar image

I want to deploy my users via hiera and create_resources. The hiera looks like this:

                ensure: present
                home: /home/user1
                comment: user1 SysAd
                ssh_keysource: "enterprise/"
                password: NOPW
                ensure: present
                home: /home/user2
                uid: 100000001
                comment: user2 SysAd
                ssh_keysource: "enterprise/"
                password: NOPW
                ensure: present
                home: /home/user3
                uid: 100000002
                comment: user3 SysAd
                ssh_keysource: "enterprise/"
                password: NOPW

and a module called user, which has a init.pp like this:

class user (

  if $::git_installed == true {
    $admin_groups = ['wheel','git']
    $userGit =  {
      'name'          => 'git',
      'name_comment'  => 'Git Version Control',
      'uid'           => 667,
      'gid'           => 667 ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-03-17 15:17:27 -0600

Stefan gravatar image

The first thing that I've noticed is you are creating user resources and passing attributes that are not valid for a user resource like name_comment, sshkey_source, manage_group, or group. So this might not work as expected.

The actual error messages indicates an error when hiera tries to load your yaml file. You'll get more detailed output when you run puppet with the --trace flag because it'll give you a stack trace that might show it is indeed the yaml ruby library that is raising the error.

Possible error: Have you used [TAB] instead of [SPACE] to indent ... (more)

edit flag offensive delete link more

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: 2014-03-11 08:56:29 -0600

Seen: 81 times

Last updated: Mar 17 '14