|
| 1 | +# Copyright 2014 Red Hat, Inc., All rights reserved. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | +# |
| 15 | +# This class creates a java keystore for ActiveMQ using provided CA, Cert, and |
| 16 | +# Keys |
1 | 17 | class openshift_origin::activemq_keystores ( |
2 | 18 |
|
3 | 19 | $ca = $::openshift_origin::msgserver_tls_ca, |
|
27 | 43 | } |
28 | 44 | file {"${activemq_confdir}/ssl_credentials": |
29 | 45 | ensure => directory, |
30 | | - mode => 0700, |
| 46 | + mode => '0700', |
31 | 47 | } |
32 | 48 | file {"${activemq_confdir}/ssl_credentials/activemq_certificate.pem": |
33 | 49 | ensure => file, |
|
42 | 58 | source => $ca, |
43 | 59 | } |
44 | 60 |
|
45 | | - |
46 | 61 | # ----- Manage Keystore Contents ----- |
47 | 62 |
|
48 | 63 | # Each keystore should have a dependency on the PEM files it relies on. |
|
59 | 74 |
|
60 | 75 | # Keystore with ActiveMQ cert and private key |
61 | 76 | java_ks { 'activemq_cert:keystore': |
62 | | - ensure => latest, |
63 | | - certificate => "${activemq_confdir}/ssl_credentials/activemq_certificate.pem", |
64 | | - private_key => "${activemq_confdir}/ssl_credentials/activemq_private.pem", |
65 | | - target => "${activemq_confdir}/keystore.jks", |
66 | | - password => $keystore_password, |
67 | | - require => [ |
| 77 | + ensure => latest, |
| 78 | + certificate => "${activemq_confdir}/ssl_credentials/activemq_certificate.pem", |
| 79 | + private_key => "${activemq_confdir}/ssl_credentials/activemq_private.pem", |
| 80 | + target => "${activemq_confdir}/keystore.jks", |
| 81 | + password => $keystore_password, |
| 82 | + require => [ |
68 | 83 | File["${activemq_confdir}/ssl_credentials/activemq_private.pem"], |
69 | 84 | File["${activemq_confdir}/ssl_credentials/activemq_certificate.pem"] |
70 | 85 | ], |
|
79 | 94 | file {"${activemq_confdir}/keystore.jks": |
80 | 95 | owner => $activemq_user, |
81 | 96 | group => $activemq_user, |
82 | | - mode => 0600, |
| 97 | + mode => '0600', |
83 | 98 | require => Java_ks['activemq_cert:keystore'], |
84 | 99 | } |
85 | 100 | file {"${activemq_confdir}/truststore.jks": |
86 | 101 | owner => $activemq_user, |
87 | 102 | group => $activemq_user, |
88 | | - mode => 0600, |
| 103 | + mode => '0600', |
89 | 104 | require => Java_ks['activemq_ca:truststore'], |
90 | 105 | } |
91 | 106 |
|
|
0 commit comments