Skip to content

Instantly share code, notes, and snippets.

@natemccurdy
Created March 30, 2016 00:23
Show Gist options
  • Save natemccurdy/81634f9d63f6ca71b95d79df3d7abb47 to your computer and use it in GitHub Desktop.
Save natemccurdy/81634f9d63f6ca71b95d79df3d7abb47 to your computer and use it in GitHub Desktop.
an example of Puppet's HEREDOC
$rc_local = @(RC_LOCAL)
#!/bin/sh
# This file is managed by Puppet. Any modifications will be overwritten.
touch /var/lock/sybsys/local
echo '# Increase SCSI timeout on all SCSI disks attached to the system at boot time'
ls -1 /sys/block/sd*/device/timeout | while read file
do
echo 360 > $file
done
| RC_LOCAL
file { '/etc/rc.d/rc.local':
ensure => file,
owner => 'root',
group => '0',
mode => '0755',
content => $rc_local,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment