Glad the concept is correct, but I've been playing with it and am not sure 
which part of the firewall class processes the passed on code. In the 
firewall/apache analogy, you use the following code.

class apache {
  firewall { '100 allow http and https access':
    port   => [80, 443],
    proto  => tcp,
    action => accept,
}

What I am not seeing is what part of the firewall class receives this 
information and knows what to do with those parameters.  If I understood 
this, I could probably figure out my example.  

I tried in my situation

managed_preferences { 
       source  => "puppet:///modules/office_2011/Preferences",
       require => Package["$main_package"],
     }

thinking that it would send these two parameters to the newly create 
managed_preferences class.  Again, I don't know how to receive the 
information to process it in the managed_preferences class.   Is the 
managed_preferences class a different type of class than the office_2011 
class?  If I knew the official terminology I could look it up and probably 
figure this out.  

Thanks again

On Friday, September 19, 2014 5:06:15 PM UTC-5, Ygor wrote:
>
> Use the same approach the firewall module uses:  A main class, declared at 
> a global level, creates/manages the folder. A defined type is used to 
> create/manage imdividual prefs files and is involed inside the module for 
> the individual app.
>
> A basic pronciple of object-oriented code. Pull out the common bits and 
> manage them in one place - in this case: the common folder. 
>
> "Sometimes I think the surest sign that intelligent life exists elsewhere 
> in the universe is that none of it has tried to contact us."
>
> Bill Waterson (Calvin & Hobbes)
>
> On Sep 19, 2014, at 5:09 PM, aar...@gmail.com <javascript:> wrote:
>
> I have a single class for every application to be installed on our 
> Macintosh clients.  The problem I am having is in the section of the class 
> below.  This copies files to the User Template folder so when users login 
> they get predefined preferences.  
>
> file { "System/Library/User Template/English.lproj/Library/Preferences/":
>     source  => "puppet:///modules/office_2011/Preferences",
>     owner   => "root",
>     group   => "wheel",
>     mode    => 600,
>     recurse => true,
>     require => Package["$main_package"],
>     }
>
> This would work perfect if I had only one application in which I wanted 
> managed preferences.  I am getting an error that the User Template folder 
> is being managed by another class.  I understand why.  I also understand 
> the purpose.  This code however only copies files into the Template Folder, 
> it doesn't overwrite, or purge the folder.  So, in theory, what I want to 
> do should be a valid approach to managing preferences.  
>
> I have an idea, but don't know how to execute it.  So I hope someone can 
> help.
>
> In the Puppetlabs/Firewall module, you can access it from another module. 
>  So if I have an apache module, I can tell the Firewall module I want to 
> open port 80.
>
> I would like to make a Macintosh Managed Preferences module that will 
> manage the User Template folder, and in each application module, I can 
> provide that module with files.  
>
> How can I accomplish this?
>
> Thanks in advance.  
>
>
>  -- 
> 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 puppet-users...@googlegroups.com <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/7fe782a1-fba4-4cef-aeab-4cf85ed170d2%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/puppet-users/7fe782a1-fba4-4cef-aeab-4cf85ed170d2%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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/afa5f8e1-af5d-4171-9701-55b501b55b36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to