Created
April 22, 2015 14:55
-
-
Save pmauduit/1f6759f93c7959b20ff2 to your computer and use it in GitHub Desktop.
puppet augeas sample (tweaking tomcat config)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define tomcat::property ( | |
$ensure = 'present', | |
$key = $name, | |
$target, | |
$value, | |
) { | |
case $ensure { | |
'present': { | |
$changes = "set ${key} '${value}'" | |
} | |
'absent': { | |
$changes = "rm ${key}" | |
} | |
default: { | |
fail "\$ensure must be 'present' or 'absent'." | |
} | |
} | |
augeas { "Set ${key} property in ${target}": | |
incl => $target, | |
lens => 'Properties.lns', | |
changes => $changes, | |
} | |
} | |
class georchestra { | |
file { ['/tmp/geonetwork', '/tmp/geonetwork/WEB-INF']: | |
ensure => directory; | |
} -> | |
georchestra::webapp { | |
'ROOT':; | |
'geonetwork': webapp_path => '/tmp'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment