Is it possible to override the provider parameter when describing a user? My Ruby skills are quite limited, but it appears that provider is always chosen based on the operating system. I would like to build a user provider that will be almost identical to the objectadd one, but uses cpu[1] to add users and groups to an ldap directory. Since the cpu commands basically mirror the native useradd/groupadd/etc commands, it should be pretty straight forward. Eventually, I''d like to have a provider that can manipulate the directory directly, but that''s not an immediate need. 1. http://cpu.sourceforge.net/ Thanks, Christian
On Mon, Sep 11, 2006 at 10:59:06AM -0700, Christian G. Warden wrote:> Is it possible to override the provider parameter when describing a > user? My Ruby skills are quite limited, but it appears that provider is > always chosen based on the operating system.I''m fairly certain that you should be able to override the provider -- I recall that was one the design intentions of the provider system. I certainly hope that you can, since I''m planning on adding a Debian-specific user management provider at some stage... - Matt
On Sep 11, 2006, at 3:04 PM, Matthew Palmer wrote:> On Mon, Sep 11, 2006 at 10:59:06AM -0700, Christian G. Warden wrote: >> Is it possible to override the provider parameter when describing a >> user? My Ruby skills are quite limited, but it appears that >> provider is >> always chosen based on the operating system. > > I''m fairly certain that you should be able to override the provider > -- I > recall that was one the design intentions of the provider system. I > certainly hope that you can, since I''m planning on adding a Debian- > specific > user management provider at some stage...I hadn''t noticed this, but I forgot to add a :provider parameter to the user type. It should be straightforward to add this, and it should definitely make it into the point release that will fix the default provider issue and those two outstanding Debian bugs. Christian, could you file that as a bug? Obviously I''d love to have a patch along with it. -- Luke Kanies http://madstop.com | http://reductivelabs.com | 615-594-8199
On Mon, Sep 11, 2006 at 05:18:35PM -0700, Luke Kanies wrote:> On Sep 11, 2006, at 3:04 PM, Matthew Palmer wrote: > > > On Mon, Sep 11, 2006 at 10:59:06AM -0700, Christian G. Warden wrote: > >> Is it possible to override the provider parameter when describing a > >> user? My Ruby skills are quite limited, but it appears that > >> provider is > >> always chosen based on the operating system. > > > > I''m fairly certain that you should be able to override the provider > > -- I > > recall that was one the design intentions of the provider system. I > > certainly hope that you can, since I''m planning on adding a Debian- > > specific > > user management provider at some stage... > > I hadn''t noticed this, but I forgot to add a :provider parameter to > the user type. It should be straightforward to add this, and it > should definitely make it into the point release that will fix the > default provider issue and those two outstanding Debian bugs.Thanks, Luke.> Christian, could you file that as a bug? > > Obviously I''d love to have a patch along with it.I''ve submitted the bug. Sorry, I don''t have enough to figure out the patch. I ended up just defining ldapuser/ldapgroup/kerberosprincipal components that use exec to create users. I''m not sure if it''s a virtue or vice, but puppet makes it easy to make manifests look quite a bit like shell scripts. xn
On Sep 11, 2006, at 7:32 PM, Christian G. Warden wrote:> I''ve submitted the bug. Sorry, I don''t have enough to figure out the > patch. > > I ended up just defining ldapuser/ldapgroup/kerberosprincipal > components > that use exec to create users. I''m not sure if it''s a virtue or vice, > but puppet makes it easy to make manifests look quite a bit like shell > scripts.I was incorrect; the provider system automatically creates a ''provider'' parameter for any type that defines one or more providers. I just verified that I can override the provider manually. Please let me know if you cannot get a user provider to work separately. If you hurry, I might be able to include it in 0.19.1. It''s nice to make a mistake that results in less work once in a while. :) -- Luke Kanies http://madstop.com | http://reductivelabs.com | 615-594-8199