Can you please provide the error messages you get.

--
Lowe Schmidt | +46 723 867 157

On 29 December 2015 at 06:45, <[email protected]> wrote:

> Hi,
>
> I am new to puppet and I am trying to write a module to manage user
> .bashrc files. I managed to place the file to the desired location with
> following code for 1 user because the username is hardcoded. However, I
> tried different ways to manage the file for 10 different users using
> variables which fails. Can someone please help me with the same.
>
> init.pp:
> class profile (
>   $bashrc                          = $profile::params::bashrc,
>   $bashrc_host                  = $profile::params::bashrc_host,
> ) inherits profile::params {
>
>   anchor { 'profile::begin': } ->
>   class { '::profile::config': } ->
>   anchor { 'profile::end': }
> }
>
> config.pp:
> class profile::config inherits profile {
> file { $bashrc:
>        ensure => file,
>        source  => "puppet:///$bashrc_host",
>     }
>
> params:pp:
> class profile::params {
>   $bashrc_host        = "modules/profile/$fqdn_user1_bashrc"
> }
>   case $::osfamily {
>     'RedHat': {
>       $bashrc                  = '/home/user1/.bashrc'
>     }
>     default: {
>       fail("The ${module_name} module is not supported on an ${::osfamily}
> based system.")
>     }
>   }
>
> Thank You
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/eda4893c-a09d-44cd-80c3-c9c0f0d67599%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/eda4893c-a09d-44cd-80c3-c9c0f0d67599%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAC-wWcSnVmJLjfc7svpP%3D6%3DF7vXVByRWn-j4jYsV1QB5EpF_7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to