Hello,

I have been searching in the puppet documentation for the these
functionalities (see below for examples):

 - Access to resource attributes or parameters to use in the recipes.
I say attributtes because may the types and providers can be extended
to get read-only resource attributes that can not be configured.

 - Generate collections based on complex queries, using regular
expresions, boolean operations, set operations (include, excludes...),
etc...

I am not sure if they are implemented or if they are difficult to
implement. Do you think that it worth it? Could you give me a clue to
investigate further?


To explain me better, I will explain some examples. Note that are just
stupid examples to explain, I do not really want to do this and syntax
is incorrect.

 1. You want to reset the password of all users in group 'wheel' that
are blocked:

   Users < groups.include? 'wheel' && blocked == true > {
    password = 'xx'
   }

 2. You want to set the selection to 'hold' for all debian packages
wich name start with 'krb5%'

   define set_hold() {
     exec {... :
      cmd => "echo hold | dpkg --set-selections $name"
     }
   }

   set_hold(Package < name =~ /krb5.*/ >)

3. You need to use an resource attribute for something.

   $last_login = User["jhon"].last_login
   debug("Jhon visited us on $last_login"

Actually, I was thinking in this functionality to use it with a
"device" provider for AIX. AIX devices have a secuencial name like
hdisk0, hdisk1, en1, en2... The number can change between hosts, or
even in the same host due several reasons. So you can not known the
device name in advance.

Consenquenly, I think that these functionalities will be very useful
in this case, for instance:

 1. Create a "alias" device for a disk based on its unique_id:
    data_dist = AixDiskDevice< unique_id == 1234 >
    MkNod("/dev/data_disk", charather, data_disk.mayor, data_disk.minor).

 2. Configure a network based on its VLAN id:

   AixNetDevice < vlan_id == 10 > {
    ip_addr = 192.168.1.1
   }



--
Atentamente
Héctor Rivas

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

Reply via email to