Skip to content

Instantly share code, notes, and snippets.

@nanliu
Created May 5, 2012 20:14
Show Gist options
  • Save nanliu/2605292 to your computer and use it in GitHub Desktop.
Save nanliu/2605292 to your computer and use it in GitHub Desktop.
file resource purge.
define mytype {
# resource type that I don't want file to purge:
# vhost { $name: ... }
file { "/tmp/www/${name}":
}
}
file { '/tmp/www':
ensure => directory,
purge => true,
}
# puppet won't touch the file /tmp/www/site_a or /tmp/www/site_b
mytype { 'site_a':
}
mytype { 'site_b':
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment