FAQ
I am trying to add ability to add virtual users to
the git://github.com/erwbgy/puppet-system.git module as I really want the
ability to use virtual users and then combine that with "User <| group ==
'x' and group == 'y' |>" way of realizing the users. This is much more
flexible than what I can do with this module out of the box.

Using the pattern in that module, I tried to do this:

class system::virt_users (
$config = undef
) {
if $config {
$defaults = {
ensure => 'present',
managehome => true,
shell => '/bin/bash'
}
create_resources(@user, $config, $defaults)
}
}


But that gives me syntax error:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Syntax error at '@'; expected ')' at
/etc/puppet/modules/system/manifests/virt_users.pp:10 on node ......

So I tried putting @user in quotes but that also generated syntax error
(could not create resource of unknown type @user).

So is there a create_virtual_resource function or some other trick to do
this?

Thanks,

Rajul

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/-ILmxaJxEBcJ.
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

  • Nan Liu at Nov 15, 2012 at 10:53 pm

    On Thu, Nov 15, 2012 at 2:04 PM, Rajul Vora wrote:
    I am trying to add ability to add virtual users to the git://
    github.com/erwbgy/puppet-system.git module as I really want the ability
    to use virtual users and then combine that with "User <| group == 'x' and
    group == 'y' |>" way of realizing the users. This is much more flexible
    than what I can do with this module out of the box.

    Using the pattern in that module, I tried to do this:

    class system::virt_users (
    $config = undef
    ) {
    if $config {
    $defaults = {
    ensure => 'present',
    managehome => true,
    shell => '/bin/bash'
    }
    create_resources(@user, $config, $defaults)
    }
    }


    But that gives me syntax error:
    Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
    Syntax error at '@'; expected ')' at
    /etc/puppet/modules/system/manifests/virt_users.pp:10 on node ......

    So I tried putting @user in quotes but that also generated syntax error
    (could not create resource of unknown type @user).

    So is there a create_virtual_resource function or some other trick to do
    this?
    See: http://projects.puppetlabs.com/issues/15081

    Nan

    --
    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.
  • Rajul Vora at Nov 15, 2012 at 11:22 pm
    Excellent, thanks.

    Rajul
    On Thursday, November 15, 2012 2:54:08 PM UTC-8, Nan Liu wrote:

    On Thu, Nov 15, 2012 at 2:04 PM, Rajul Vora <raju...@gmail.com<javascript:>
    wrote:
    I am trying to add ability to add virtual users to the git://
    github.com/erwbgy/puppet-system.git module as I really want the ability
    to use virtual users and then combine that with "User <| group == 'x' and
    group == 'y' |>" way of realizing the users. This is much more flexible
    than what I can do with this module out of the box.

    Using the pattern in that module, I tried to do this:

    class system::virt_users (
    $config = undef
    ) {
    if $config {
    $defaults = {
    ensure => 'present',
    managehome => true,
    shell => '/bin/bash'
    }
    create_resources(@user, $config, $defaults)
    }
    }


    But that gives me syntax error:
    Error: Could not retrieve catalog from remote server: Error 400 on
    SERVER: Syntax error at '@'; expected ')' at
    /etc/puppet/modules/system/manifests/virt_users.pp:10 on node ......

    So I tried putting @user in quotes but that also generated syntax error
    (could not create resource of unknown type @user).

    So is there a create_virtual_resource function or some other trick to do
    this?
    See: http://projects.puppetlabs.com/issues/15081

    Nan
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/JGnnLE_AZfgJ.
    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.
  • Jakov Sosic at Nov 21, 2012 at 1:24 pm

    On 11/15/2012 11:04 PM, Rajul Vora wrote:

    I am trying to add ability to add virtual users to
    the git://github.com/erwbgy/puppet-system.git module as I really want
    I've run into same exact problem yesterday, and found patch that Nan Liu
    mentions..


    What I am interested in is when can we expect Puppet 3.1.0? If someone
    can answer me :)

    Till then I'm manually patching create_resources.rb :-/

    --
    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.
  • Jeff McCune at Nov 27, 2012 at 1:38 am

    On Wed, Nov 21, 2012 at 5:24 AM, Jakov Sosic wrote:
    On 11/15/2012 11:04 PM, Rajul Vora wrote:

    I am trying to add ability to add virtual users to
    the git://github.com/erwbgy/puppet-system.git module as I really want
    I've run into same exact problem yesterday, and found patch that Nan Liu
    mentions..


    What I am interested in is when can we expect Puppet 3.1.0? If someone
    can answer me :)
    I don't have an exact date, but before the end of 2012 in all likelyhood.

    -Jeff

    --
    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
postedNov 15, '12 at 10:18p
activeNov 27, '12 at 1:38a
posts5
users4
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase