Hi! I cannot find it in documentation (yet?), but can puppet handle device files, in (examplary) form like this: file { "/var/named/dev/zero": ensure => device, minor => 10, major => 20, } Can this be done or do I have to create my own type handlers? Thanks, b. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
2009/9/10 Bostjan Skufca <bostjan.skufca@gmail.com>:> > Hi! > > I cannot find it in documentation (yet?), but can puppet handle device > files, in (examplary) form like this: > > file { "/var/named/dev/zero": > ensure => device, > minor => 10, > major => 20, > } > > Can this be done or do I have to create my own type handlers? >You would need to create your own type for this (or extend the existing file type). Regards James Turnbull -- Author of: * Pro Linux Systems Administration (http://tinyurl.com/linuxadmin) * Pulling Strings with Puppet (http://tinyurl.com/pupbook) * Pro Nagios 2.0 (http://tinyurl.com/pronagios) * Hardening Linux (http://tinyurl.com/hardeninglinux) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Bostjan, On Wed, Sep 9, 2009 at 7:17 PM, Bostjan Skufca <bostjan.skufca@gmail.com> wrote:> > Hi! > > I cannot find it in documentation (yet?), but can puppet handle device > files, in (examplary) form like this: > > file { "/var/named/dev/zero": > ensure => device, > minor => 10, > major => 20, > } > > Can this be done or do I have to create my own type handlers?I do this by taking advantage of the device files already in /dev: define copy_device_node() { exec { "copy_device_node_${name}": command => "/usr/bin/rsync -aR $name /chroot", creates => "/chroot${name}", } } copy_device_node { "/dev/log": ; "/dev/null": ; ... } Amazing how many uses you can find for rsync. :) -jab -- John A. Barbuto jbarbuto@corp.sourceforge.com Senior System Administrator SourceForge, Inc. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Nice trick. Thans for all the input! b. On Sep 12, 3:42 am, "John A. Barbuto" <jbarb...@corp.sourceforge.com> wrote:> Hi Bostjan, > > On Wed, Sep 9, 2009 at 7:17 PM, Bostjan Skufca <bostjan.sku...@gmail.com> wrote: > > > Hi! > > > I cannot find it in documentation (yet?), but can puppet handle device > > files, in (examplary) form like this: > > > file { "/var/named/dev/zero": > > ensure => device, > > minor => 10, > > major => 20, > > } > > > Can this be done or do I have to create my own type handlers? > > I do this by taking advantage of the device files already in /dev: > > define copy_device_node() { > exec { > "copy_device_node_${name}": > command => "/usr/bin/rsync -aR $name /chroot", > creates => "/chroot${name}", > } > } > > copy_device_node { > "/dev/log": ; > "/dev/null": ; > ... > } > > Amazing how many uses you can find for rsync. :) > > -jab > > -- > John A. Barbuto jbarb...@corp.sourceforge.com > Senior System Administrator SourceForge, Inc.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---