As of GNU coreutils 7.5 released in August 2009, sort
allows a -h
parameter, which allows numeric suffixes of the kind produced by du -h
:
du -hs * | sort -h
If you are using a sort that does not support -h
, you can install GNU Coreutils. E.g. on an older Mac OS X:
brew install coreutils
du -hs * | gsort -h
From sort
manual:
-h, --human-numeric-sort compare human readable numbers (e.g., 2K 1G)
The only trickiness that I'm aware of is in the file
resource type.
Backup for replaced files behaves differently, using the server's filebucket by default instead of the local filebucket.
The more significant thing to be aware of is the source
parameter.
source => '/tmp/somepath/sshd_config',
With a raw file path, it'll always try the local path.
source => 'puppet://puppetmaster1/modules/sshd/sshd_config',
With a puppet://server/
path, it'll always try the remote path.
source => 'puppet:///modules/sshd/sshd_config',
With an empty server specification, then it gets interesting.
Applied locally, the local puppet module path is used to find the file.
When reporting to a puppetmaster, the server that gave it the manifest is treated as the server.
Additionally, if you need to get creative about the source of a file, you can give the source
parameter a list:
source => [ '/tmp/somepath/sshd_config', 'puppet:///modules/sshd/sshd_config'],
The first location where something's found will be used.
Best Answer
I have a site.pp that looks like this:
and have a
nodes/
directory inmanifests/
So that I have a set of nodes in
"workstations.pp"
"webservers.pp"
and so on..