FAQ
Hi,

I'm trying to assign PublicKeys from a set of users to multiple System
Users like

node example.example.com {
include ssh::auth
ssh::auth::server { ["thomas", "peter", "steve", ]: user =>
"appuser" }
ssh::auth::server { ["thomas", "peter", ]: user => "admin" }
}

I got following error:
Could not retrieve catalog from remote server: Error 400 on SERVER:
Duplicate definition: Ssh::Auth::Server[thomas] is already defined in
file /etc/puppet/manifests/nodes.pp

Does anyone knows a workaround for this?

Thanks
Thomas

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Jcbollinger at May 24, 2012 at 1:19 pm

    On May 23, 7:51 am, tommodore wrote:
    Hi,

    I'm trying to assign PublicKeys from a set of users to multiple System
    Users like

    node example.example.com {
    include ssh::auth
    ssh::auth::server { ["thomas", "peter", "steve",  ]: user =>
    "appuser" }
    ssh::auth::server { ["thomas", "peter", ]: user => "admin" }

    }

    I got following error:
    Could not retrieve catalog from remote server: Error 400 on SERVER:
    Duplicate definition: Ssh::Auth::Server[thomas] is already defined in
    file /etc/puppet/manifests/nodes.pp

    Does anyone knows a workaround for this?

    Much depends on the definition of ssh::auth:server, which you did not
    provide. I took a quick look around for a public release of it
    somewhere, but nothing turned up. I can therefore speak only in
    generalities. There are three possibilities:

    1) If the ssh::auth::server definition supports it, you can specify
    the "user" property as an array:
    node example.example.com {
    include ssh::auth
    ssh::auth::server { 'steve': user => 'appuser' }
    ssh::auth::server { ['thomas', 'peter', ]: user => ['admin',
    'appuser'] }
    }

    2) Alternatively, it may be possible to separate the resource title
    from the system user. It could be something similar to this:

    node example.example.com {
    include ssh::auth
    ssh::auth::server { 'steve': user => 'appuser' }
    ssh::auth::server { 'thomas-admin':
    sys_user => 'thomas',
    user => 'admin'
    }
    ssh::auth::server { 'peter-admin':
    sys_user => 'peter',
    user => 'admin'
    }
    ssh::auth::server { 'thomas-appuser':
    sys_user => 'thomas',
    user => 'appuser'
    }
    ssh::auth::server { 'peter-appuser':
    sys_user => 'peter',
    user => 'appuser'
    }
    }

    3) If the ssh::auth::user type does not support either of the above
    approaches, then you'll need to modify it to do so or replace it with
    something different that does.


    John

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMay 23, '12 at 12:51p
activeMay 24, '12 at 1:19p
posts2
users2
websitepuppetlabs.com

2 users in discussion

Jcbollinger: 1 post Tommodore: 1 post

People

Translate

site design / logo © 2022 Grokbase