I have

  host { "hosts buildserver" :

                ip => "192.168.1.1"

                name => "buildserver",

                ensure => present,

        }


so how do I ensure aliases are absent

  host { "hosts buildserver" :

                ip => "192.168.1.1",

                name => "buildserver",

                ensure => present,

                alias =>  ensure => absent,
        }


That doesn't seem to make sense and I get

Jan 14 01:22:04 buildserver puppetd[1212]: [ID 702911 daemon.error]
Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not parse for environment production: Syntax error at '=>';
expected '}' at /etc/puppet/manifests/nodes.pp:113


Perhaps I wasn't clear with my question I meant the alias for the host
(the host type).

Or do I just have the syntax wrong.

I have tried

alias => undef,
alias => '',
alias => [],
alias => [undef],
alias =>[undef],

none of which seem to remove the alias if it is already in the host
file and do this only once not every time puppetd runs.

Thanks

Peter


On Jan 14, 12:15 am, Ohad Levy <[email protected]> wrote:
> ensure => absent
>
> On Thu, Jan 14, 2010 at 3:11 PM, Peter <[email protected]> wrote:
> > Hi,
>
> > I'm trying to create a host entry and want puppet to remove the alias
> > if is exists for that host in the host file.
>
> > If alias is not set aliases are left as they are for that host.
>
> > If alias is set to undef aliases are left as they are.
>
> > If alias is set to '' is constantly changes the host file on each run.
>
> > Is ther a way of achieving this?
>
> > Thanks
>
> > Peter
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Puppet Users" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<puppet-users%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/puppet-users?hl=en.
-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.


Reply via email to