Passing a yaml throws errors on some parameters

Hi,

I have a define type with parameters like this:

define user ( $username=$title,
$comment='',
$uid='',
$gid=$uid,
$groups=[ 'users',],
$password='',
$shell="/bin/false",
$sudo=false, )
{

actual definition

}

That gets called by init.pp:

class users ($data) {
create_resources(user, $data)
}

I'm trying to pass a yaml to it:
user:
uid: 500
comment: Test user
password: PW HASH
shell: /bin/bash

Now this works perfectly fine, and the user gets created, but as soon as I
try to pass sudo it fails:
user:
uid: 500
comment: Test user
password: PW HASH
shell: /bin/bash
sudo: true

Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Invalid parameter sudo on node puppet.local

It does not matter if I do anything with the sudo parameter. The default
works, but as soon as I alter it via yaml it throws the error. There is no
sudo class, not any other parameter containing "sudo" in the host yaml

Any ideas what could be causing this?

Thanks!

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Have some debug logging on the master / agent ?

> Hi,
>
> I have a define type with parameters like this:
>
> define user ( $username=$title,
> $comment='',
> $uid='',
> $gid=$uid,
> $groups=[ 'users',],
> $password='',
> $shell="/bin/false",
> $sudo=false, )
> {
> #### actual definition
> }
>
> That gets called by init.pp:
>
> class users ($data) {
> create_resources(user, $data)
> }
>
> I'm trying to pass a yaml to it:
> user:
> uid: 500
> comment: Test user
> password: PW HASH
> shell: /bin/bash
>
> Now this works perfectly fine, and the user gets created, but as soon
as I try to pass sudo it fails:
> user:
> uid: 500
> comment: Test user
> password: PW HASH
> shell: /bin/bash
> sudo: true
>
> Error: Could not retrieve catalog from remote server: Error 400 on
SERVER: Invalid parameter sudo on node puppet.local
>
> It does not matter if I do anything with the sudo parameter. The
default works, but as soon as I alter it via yaml it throws the error.
There is no sudo class, not any other parameter containing "sudo" in the
host yaml
>
>
> Any ideas what could be causing this?
>
> Thanks!
> –
> You received this message because you are subscribed to the Google
Groups "Foreman users" group.
> To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com.

··· On 01/13/2014 05:46 PM, Karolis Pabijanskas wrote: > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/groups/opt_out.