chakkerz
2009-Feb-25 05:27 UTC
[Puppet Users] directory creation - difference in operation between RHEL5 and Solaris
The following code, file { "/var/log/sysinfo": owner => root, group => root, mode => 755, ensure => [ present, directory ], } on RHEL5 generates a directory: [root@puppetks4 ~]# uname -a ; ls -ld /var/log/sysinfo Linux puppetks4.its.uq.edu.au 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux drwxr-xr-x 2 root root 4096 Feb 18 09:04 /var/log/sysinfo using [root@puppetks4 ~]# rpm -q puppet puppet-0.24.7-4.el5 while on OpenSolaris generates a file: root@puppetsun:/# uname -a ; ls -l /var/log/sysinfo SunOS puppetsun 5.11 snv_101b i86pc i386 i86pc Solaris -rwxr-xr-x 1 root root 0 2009-02-13 17:57 /var/log/sysinfo using root@puppetsun:/# pkginfo -l CSWpuppet PKGINST: CSWpuppet NAME: puppet - a system configuration tool CATEGORY: application,system ARCH: all VERSION: 0.24.7,REV=2009.01.10 BASEDIR: / VENDOR: http://reductivelabs.com/projects/puppet packaged for CSW by Gary Law and Mark Phillips PSTAMP: zone6120090110180023 INSTDATE: Dec 29 1986 04:18 EMAIL: g...@blastwave.org STATUS: completely installed FILES: 524 installed pathnames 12 shared pathnames 95 directories 419 executables 3713 blocks used (approx) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
AJ Christensen
2009-Feb-25 05:57 UTC
[Puppet Users] Re: directory creation - difference in operation between RHEL5 and Solaris
You probably wanna use ensure => directory, as it implies present, and ensure present will make a file IIRC On 25/02/2009, at 6:27 PM, chakkerz wrote:> > The following code, > file > { "/var/log/sysinfo": > owner => root, > group => root, > mode => 755, > ensure => [ present, directory ], > } > > on RHEL5 generates a directory: > [root@puppetks4 ~]# uname -a ; ls -ld /var/log/sysinfo > Linux puppetks4.its.uq.edu.au 2.6.18-128.el5 #1 SMP Wed Dec 17 > 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux > drwxr-xr-x 2 root root 4096 Feb 18 09:04 /var/log/sysinfo > > using > [root@puppetks4 ~]# rpm -q puppet > puppet-0.24.7-4.el5 > > while on OpenSolaris generates a file: > root@puppetsun:/# uname -a ; ls -l /var/log/sysinfo > SunOS puppetsun 5.11 snv_101b i86pc i386 i86pc Solaris > -rwxr-xr-x 1 root root 0 2009-02-13 17:57 /var/log/sysinfo > > using > root@puppetsun:/# pkginfo -l CSWpuppet > PKGINST: CSWpuppet > NAME: puppet - a system configuration tool > CATEGORY: application,system > ARCH: all > VERSION: 0.24.7,REV=2009.01.10 > BASEDIR: / > VENDOR: http://reductivelabs.com/projects/puppet packaged for CSW > by Gary Law and Mark Phillips > PSTAMP: zone6120090110180023 > INSTDATE: Dec 29 1986 04:18 > EMAIL: g...@blastwave.org > STATUS: completely installed > FILES: 524 installed pathnames > 12 shared pathnames > 95 directories > 419 executables > 3713 blocks used (approx) > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
chakkerz
2009-Feb-26 03:53 UTC
[Puppet Users] Re: directory creation - difference in operation between RHEL5 and Solaris
i see... i''ll give it a shot . Thanks for the input. chakkerz --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
chakkerz
2009-Feb-26 23:36 UTC
[Puppet Users] Re: directory creation - difference in operation between RHEL5 and Solaris
no good with just ensure => directory, on solaris i get it to create the file (so no change): root@puppetsun:~# rm -rf /var/log/sysinfo root@puppetsun:~# /opt/csw/bin/puppetd -vt | grep sysinfo notice: //Node[default]/defaultnode/shared-default/sysinfo/File[/var/ log/sysinfo]/ensure: created root@puppetsun:~# ls -ld /var/log/sysinfo -rwxr-xr-x 1 root root 0 2009-02-13 18:45 /var/log/sysinfo while on red hat it now doesn''t create a directory anymore... [root@puppetks4 sbin]# rm /var/log/sysinfo [root@puppetks4 sbin]# ls -l /var/log/sysinfo ls: /var/log/sysinfo: No such file or directory [root@puppetks4 sbin]# puppetd -vt | grep sysinfo notice: //Node[default]/defaultnode/shared-default/sysinfo/File[/var/ log/sysinfo]/ensure: created [root@puppetks4 sbin]# ls -l /var/log/sysinfo -rwxr-xr-x 1 root root 0 Feb 27 09:34 /var/log/sysinfo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
chakkerz
2009-Feb-26 23:43 UTC
[Puppet Users] Re: directory creation - difference in operation between RHEL5 and Solaris
Despite originally appearing to not work, it actually does. I modified the wrong part of the file. Thanks for that AJ. ... no i have to get solaris to be able to access the files in modules and i''ll be ready to deploy :D chakkerz --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---