Hi,

Wondering how to substitute the OS X username into the manifest document.

Here are the details:

*On the OS X client:*

Username is user1


*on the puppet server:*

sites.pp file:


file { "/Users/$identity['user']/Applications/mpbar/myscript.sh":
        ensure => 'file',
        owner => 'user1',
        group => 'staff',
        mode => '0755',
        source => "puppet:///modules/mymodule/myscript.sh",
        backup => 'false',
}


If I hard code 'user1' everything works but when I try to substitute the 
username from the agent I get all the key pairs from identity and not just 
the user name (user1):

/Users/{gid => 20, group => staff, uid => 504, user => 
user1}['user']/Applications/mpbar/myscript.sh


I've tried $identity.user as well with no luck.

Any advice on how I can get the local OS X username passed into the 
sites.pp file so this works properly?

Appreciate any help.

Luis
 

-- 
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/2c6ab656-ece6-4835-af66-2058877aac4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to