I''ve got puppet to do some interesting things in my development farm.
However getting a file to disk has me stumped. I''m pretty sure
I''m making a simple mistake but I''ve been over it and I
don''t see it.
Aside: the Type Reference claims that ''it is expected that the file
element will be used less and less to manage content''. Is there a
better way to push files to a host that I simply don''t see because
I''ve spent 10 years doing it one way and I"m stuck in a rut?
I''m too young to be an inflexible old phart.
All of our hosts have a banner to display on login from SSH, kept at /etc/issue.
I''d simply like to have this file copied there, or updated if it
changes.
* Fileserver.conf configured to allow everyone to module
''dist''
# fileserver.conf
# $Id: fileserver.conf 1861 2006-11-12 22:16:59Z luke $
[dist]
path /ops/tools/puppet/files
allow *
* The directory under ''path'' exists
# ls -la /ops/tools/puppet/files
total 24
drwxr-xr-x 3 root root 4096 Nov 16 10:03 .
drwxr-xr-x 3 puppet puppet 4096 Nov 16 10:03 ..
drwxr-xr-x 2 puppet puppet 4096 Nov 16 10:03 etc
* And has a file called issue
:# ls -la /ops/tools/puppet/files/etc/*
-rw-r--r-- 1 puppet puppet 318 Nov 15 15:09
/ops/tools/puppet/files/etc/issue
* This is banner.pp
# banner.pp
class banner {
file { "/etc/issue":
owner => root,
group => root,
mode => 440,
source => "puppet://puppetdev/dist/etc/issue"
}
}
* Puppetmasterd is running
# ps -ef |grep pupp
puppet 6369 26689 0 09:56:54 ? 0:02 /opt/csw/bin/ruby
/opt/csw/bin/puppetmasterd
root 24538 11895 0 10:20:07 pts/1 0:00 grep pupp
* There is no existing file called /etc/issue - when I run ''puppet
banner.bb'' it doesn''t work. Nothing is logged and the file is
not copied to /etc/issue.
# puppet -l /tmp/ban.log -v banner.pp
# ls -la /tmp/ban.log
-rw-r--r-- 1 root root 0 Nov 15 16:17 /tmp/ban.log
# ls -la /etc/issue
/etc/issue: No such file or directory
Brian Dunbar
Systems Administrator
Plexus
Desk: (920) 751-3364
Cell: (920) 716-2027
_______________________________________________
Puppet-users mailing list
Puppet-users@madstop.com
https://mail.madstop.com/mailman/listinfo/puppet-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 16 November 2007, Brian Dunbar wrote:> I''ve got puppet to do some interesting things in my development farm. > However getting a file to disk has me stumped. I''m pretty sure I''m making > a simple mistake but I''ve been over it and I don''t see it. > > > Aside: the Type Reference claims that ''it is expected that the file element > will be used less and less to manage content''. Is there a better way to > push files to a host that I simply don''t see because I''ve spent 10 years > doing it one way and I"m stuck in a rut? I''m too young to be an inflexible > old phart.To finish the quote: "[...] and instead native elements will be used to do so." So, it''s "just" a matter of people writing the appropriate native types.> [problem description snipped]For info about what puppet is doing please use "puppetd --test" from the commandline. For intense debugging info add "--debug". Regards, David - -- The primary freedom of open source is not the freedom from cost, but the free- dom to shape software to do what you want. This freedom is /never/ exercised without cost, but is available /at all/ only by accepting the very different costs associated with open source, costs not in money, but in time and effort. - -- http://www.schierer.org/~luke/log/20070710-1129/on-forks-and-forking -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHPc/t/Pp1N6Uzh0URAhNhAJ9B50FMrkmwKfriGWDwVWlNoOvMIgCgmYU8 HBXUJY0jXdqirQit4Bd+w6A=OUnV -----END PGP SIGNATURE-----
"For info about what puppet is doing please use "puppetd --test" from the commandline. For intense debugging info add "--debug"." Et voila. Turns out that I had (bad habit) saved a copy of of banner.pp as banner.bak in ./classes. This became obvious when I ran the test from my client with --test. Saving a file instead of using SVN. Bad admin - no cookie! Thanks! Brian Dunbar Systems Administrator Plexus Desk: (920) 751-3364 Cell: (920) 716-2027 -----Original Message----- From: puppet-users-bounces@madstop.com on behalf of David Schmitt Sent: Fri 11/16/2007 11:14 AM To: Puppet User Discussion Subject: Re: [Puppet-users] File copy problem -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 16 November 2007, Brian Dunbar wrote:> I''ve got puppet to do some interesting things in my development farm. > However getting a file to disk has me stumped. I''m pretty sure I''m making > a simple mistake but I''ve been over it and I don''t see it. > > > Aside: the Type Reference claims that ''it is expected that the file element > will be used less and less to manage content''. Is there a better way to > push files to a host that I simply don''t see because I''ve spent 10 years > doing it one way and I"m stuck in a rut? I''m too young to be an inflexible > old phart.To finish the quote: "[...] and instead native elements will be used to do so." So, it''s "just" a matter of people writing the appropriate native types.> [problem description snipped]For info about what puppet is doing please use "puppetd --test" from the commandline. For intense debugging info add "--debug". Regards, David - -- The primary freedom of open source is not the freedom from cost, but the free- dom to shape software to do what you want. This freedom is /never/ exercised without cost, but is available /at all/ only by accepting the very different costs associated with open source, costs not in money, but in time and effort. - -- http://www.schierer.org/~luke/log/20070710-1129/on-forks-and-forking -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHPc/t/Pp1N6Uzh0URAhNhAJ9B50FMrkmwKfriGWDwVWlNoOvMIgCgmYU8 HBXUJY0jXdqirQit4Bd+w6A=OUnV -----END PGP SIGNATURE----- _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 16 November 2007, Brian Dunbar wrote:> "For info about what puppet is doing please use "puppetd --test" from the > commandline. For intense debugging info add "--debug"." > > Et voila. Turns out that I had (bad habit) saved a copy of of banner.pp as > banner.bak in ./classes. This became obvious when I ran the test from my > client with --test. > > Saving a file instead of using SVN. Bad admin - no cookie!Yeah :) also you should ''include "*.pp"'' which would have helped in this case too.> Thanks!Sure :) In the end you fixed your problem yourself anyways. Regards, DavidS> > Brian Dunbar > Systems Administrator > Plexus > Desk: (920) 751-3364 > Cell: (920) 716-2027 > > > > -----Original Message----- > From: puppet-users-bounces@madstop.com on behalf of David Schmitt > Sent: Fri 11/16/2007 11:14 AM > To: Puppet User Discussion > Subject: Re: [Puppet-users] File copy problem > > On Friday 16 November 2007, Brian Dunbar wrote: > > I''ve got puppet to do some interesting things in my development farm. > > However getting a file to disk has me stumped. I''m pretty sure I''m > > making a simple mistake but I''ve been over it and I don''t see it. > > > > > > Aside: the Type Reference claims that ''it is expected that the file > > element will be used less and less to manage content''. Is there a better > > way to push files to a host that I simply don''t see because I''ve spent 10 > > years doing it one way and I"m stuck in a rut? I''m too young to be an > > inflexible old phart. > > To finish the quote: "[...] and instead native elements will be used to do > so." So, it''s "just" a matter of people writing the appropriate native > types. > > > [problem description snipped] > > For info about what puppet is doing please use "puppetd --test" from the > commandline. For intense debugging info add "--debug". > > > Regards, David- -- The primary freedom of open source is not the freedom from cost, but the free- dom to shape software to do what you want. This freedom is /never/ exercised without cost, but is available /at all/ only by accepting the very different costs associated with open source, costs not in money, but in time and effort. - -- http://www.schierer.org/~luke/log/20070710-1129/on-forks-and-forking -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHPeoz/Pp1N6Uzh0URArUMAJ9UwIBk0b81VqDg9KNa95gmTeirhwCfRcNo CFLMTQtRjIVgu8h0UYf83MM=RamB -----END PGP SIGNATURE-----