Last active
August 29, 2015 13:55
-
-
Save deinspanjer/8736534 to your computer and use it in GitHub Desktop.
This file contains 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
Instead of this: | |
define set_fix { | |
file_line { "$name": | |
path => "$name", | |
line => 'JAVA_HOME=${JAVA_HOME:-/usr/jdk64/jdk1.6.0_31}', | |
match => 'JAVA_HOME=.*/jdk1\.6\.0.*', | |
ensure => "present", | |
} | |
} | |
set_fix { set_fix { [ '/etc/hcatalog/conf.dist/hcat-env.sh', '/etc/pig/conf.dist/pig-env.sh', ]: }: } | |
I should try this: | |
$files_to_fix = { | |
'hcat-env.sh' => { path => '/etc/hcatalog/conf.dist/hcat-env.sh' }, | |
'pig-env.sh' => { path => '/etc/pig/conf.dist/pig-env.sh' }, | |
} | |
$fix_default_attrs = { | |
line => 'JAVA_HOME=${JAVA_HOME:-/usr/jdk64/jdk1.6.0_31}', | |
match => 'JAVA_HOME=.*/jdk1\.6\.0.*', | |
ensure => "present", | |
} | |
create_resources('file_line', $files_to_fix, $fix_default_attrs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment