1515
1616 let :java_home do
1717 if os [ :family ] . match? ( %r{debian|ubuntu} )
18+ architecture = ( os [ :arch ] == 'aarch64' ) ? 'arm64' : 'amd64'
19+
1820 if os [ :release ] . start_with? ( '9' )
19- ' "/usr/lib/jvm/java-8-openjdk-${facts[\'os\'][\' architecture\']}"'
21+ "/usr/lib/jvm/java-8-openjdk-#{ architecture } "
2022 else
21- ' "/usr/lib/jvm/java-11-openjdk-${facts[\'os\'][\' architecture\']}"'
23+ "/usr/lib/jvm/java-11-openjdk-#{ architecture } "
2224 end
2325 elsif os [ :family ] . include? ( 'redhat' )
24- '" /etc/alternatives/java_sdk" '
26+ '/etc/alternatives/java_sdk'
2527 else
2628 'undef'
2729 end
3436 pp = <<-MANIFEST
3537 class{'java':}
3638
37- $java_home = #{ java_home }
39+ $java_home = ' #{ java_home } '
3840
3941 class jsvc {
4042 archive { 'commons-daemon-native.tar.gz':
@@ -138,7 +140,7 @@ class jsvc {
138140 context 'Stop tomcat with verification!!!' do
139141 it 'applies the manifest without error' do
140142 pp = <<-MANIFEST
141- $java_home = #{ java_home }
143+ $java_home = ' #{ java_home } '
142144
143145 tomcat::service { 'jsvc-default':
144146 service_ensure => stopped,
@@ -162,7 +164,7 @@ class jsvc {
162164 context 'Start Tomcat with verification' do
163165 it 'applies the manifest without error' do
164166 pp = <<-MANIFEST
165- $java_home = #{ java_home }
167+ $java_home = ' #{ java_home } '
166168
167169 tomcat::service { 'jsvc-default':
168170 service_ensure => running,
@@ -205,7 +207,7 @@ class jsvc {
205207 context 'remove the connector with verification' do
206208 it 'applies the manifest without error' do
207209 pp = <<-MANIFEST
208- $java_home = #{ java_home }
210+ $java_home = ' #{ java_home } '
209211
210212 tomcat::config::server::connector { 'tomcat8-jsvc':
211213 connector_ensure => 'absent',
0 commit comments