├── .github └── PULL_REQUEST_TEMPLATE.txt ├── .gitignore ├── .rspec ├── .travis.yml ├── CHANGELOG.md ├── Gemfile ├── LICENSE ├── README.md ├── Rakefile ├── VERSION ├── Vagrantfile ├── action_plugins └── keystore.py ├── ansible.cfg ├── defaults └── main.yml ├── envvars-vagrant.sample ├── library └── keystore.py ├── meta └── main.yml ├── requirements.yml ├── scripts └── release.sh ├── spec ├── default │ └── java_spec.rb ├── lib │ └── vagrant.rb └── spec_helper.rb ├── tasks ├── download.yml └── main.yml ├── templates ├── facts.j2 ├── java.sh.j2 └── sha256sum.j2 ├── tests ├── bar.foo.org.crt ├── foo.bar.org.crt ├── hosts ├── requirements.yml └── test.yml └── vars ├── Debian.yml ├── RedHat.yml ├── main.yml └── versions ├── 7u21.yml ├── 7u51.yml ├── 7u71.yml ├── 7u80.yml ├── 8u101.yml ├── 8u102.yml ├── 8u111.yml ├── 8u112.yml ├── 8u121.yml ├── 8u20.yml ├── 8u25.yml ├── 8u31.yml ├── 8u45.yml ├── 8u51.yml ├── 8u60.yml ├── 8u65.yml ├── 8u66.yml ├── 8u92.yml └── default.yml /.github/PULL_REQUEST_TEMPLATE.txt: -------------------------------------------------------------------------------- 1 | Please do NOT open any pull requests as this role is considered a showcase project and not maintained publicly. 2 | 3 | All pull requests will be ignored! 4 | 5 | If you want to integrate your own changes into this role, feel free to fork it! 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### Files to be ignored by Git ### 2 | 3 | # Ruby 4 | Gemfile.lock 5 | 6 | # Vagrant 7 | /\.vagrant/ 8 | /tests/roles/ 9 | 10 | # IntelliJ IDEA 11 | /*\.ipr 12 | /*\.iws 13 | /\.idea/ 14 | **/*\.iml 15 | 16 | # Eclipse 17 | /\.classpath 18 | /\.project 19 | /\.settings/ 20 | 21 | # Emacs 22 | .*~ 23 | 24 | # Python 25 | **/*.pyc 26 | 27 | # Mac 28 | **/\.DS_Store 29 | 30 | # Custom 31 | /temp/ 32 | /tmp/ 33 | envvars-vagrant 34 | \.*\.swp 35 | \.*\.swo 36 | \.environ 37 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --format documentation 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: python 3 | python: "2.7" 4 | before_install: 5 | - sudo apt-get update --assume-yes -qq 6 | - sudo apt-get install --assume-yes -qq python-apt python-pycurl 7 | install: 8 | - sudo pip install ansible 9 | script: 10 | - ansible --version 11 | - ansible-playbook --inventory-file tests/hosts --syntax-check tests/playbook.yml 12 | - ansible-playbook --inventory-file tests/hosts --connection=local -vvvv tests/playbook.yml 13 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 224 2 | 3 | Anja Siek (1): 4 | 5 | * remove shasum check and allow to override version variables 6 | 7 | Mark Kusch (2): 8 | 9 | * Fix YAML syntax error 10 | * Oracle does allow to download current only so we test current only 11 | 12 | # 223 13 | 14 | Anja Siek (1): 15 | 16 | * fix broken keystore-module for ansible 2.3 17 | 18 | Mark Kusch (1): 19 | 20 | * Fix ansible 2.3 deprecation warnings 21 | 22 | # 222 23 | 24 | Alvaro Aleman (1): 25 | 26 | * Add github issue template 27 | 28 | Anja Siek (2): 29 | 30 | * add versions support 31 | * add url-hack for verion 8u121 32 | 33 | Mark Kusch (2): 34 | 35 | * Add Java 8 update 92 to supported versions (thx to Sebastian Davids) 36 | * Fix misleading variable names in documentation (thx to robertomoutinho) 37 | 38 | # 2.2.1 39 | 40 | Anja Siek (3): 41 | 42 | * update generator 43 | * use variable instead of hardcoded lib role path 44 | 45 | Mark Kusch (1): 46 | 47 | * Reduce test playbook for ansible-java 48 | 49 | Ruslan Tumarkin (1): 50 | 51 | * Add two new supported versions: 8u101, 8u102 52 | 53 | # 2.2.0 54 | 55 | Alvaro Aleman (1): 56 | 57 | * Only do upgrades when explicitly asked 58 | 59 | Mark Kusch (12): 60 | 61 | * Re-run ansible-generator 62 | * Re-run ansible-generator (part 2) 63 | * Fixup java\_keystore\_certificates variable undefined 64 | * Provide separation for better role testing 65 | * Add role\_version fact 66 | * Use ansible\_check\_mode fact 67 | * ansible-java now requires min\_ansible\_version >= 2.1.N 68 | * Remove leftover keystore test playbook 69 | * Use package module in favor of action: {{ fact }} 70 | * Fedora 23 has no python 2 71 | * Fix vagrant bug with galaxy\_roles\_path 72 | * Fixup Vagrant/ansible-galaxy for Vagrant >= 1.8.4 73 | 74 | Nathan Mische (1): 75 | 76 | * Fixing keystore for Ansible 2.1.0.0 77 | 78 | # 2.1.0 79 | 80 | Ludovic Claude (1): 81 | 82 | * Use local become settings from sipion.util 83 | 84 | Mark Kusch (3): 85 | 86 | * Fix ansible v2 deprecation warnings 87 | * Do not hardcode privilege escalation 88 | * Remove stub become configuration 89 | 90 | # 2.0.3 91 | 92 | Mark Kusch (1): 93 | 94 | * PEBKAC 95 | 96 | # 2.0.2 97 | 98 | Mark Kusch (1): 99 | 100 | * Fixup dependency management 101 | 102 | # 2.0.1 103 | 104 | Mark Kusch (4): 105 | 106 | * Re-add dependency to silpion.util 107 | * ansible-galaxy shall install both lib and util roles 108 | * Minor documentation "fixes" related to dependencies 109 | 110 | # 2.0.0 111 | 112 | Anja Siek (2): 113 | 114 | * fix keystore module for v2 compatibility 115 | 116 | Mark Kusch (12): 117 | 118 | * Add dependency to min Ansible version 2.0.0.2 119 | * Update documentation to be hopefully more meaningful 120 | * Wrap util\_template\_use\_cow variable for templates 121 | * Use lib\_ variables for templates 122 | * Update dependencies from util to lib 123 | * ansible-java librification 124 | * Do not download anything in --check mode operations 125 | * Do not allow curl to hang the play forever 126 | 127 | # 1.6.0 128 | 129 | Alvaro Aleman (1): 130 | 131 | * Add java\_download tag to all required tasks 132 | 133 | Mark Kusch (2): 134 | 135 | * Ensure version specific sha256sum templates 136 | * Add latest 8 and 7 for jre, jdk and srv to test playbook 137 | 138 | # 1.5.1 139 | 140 | Mark Kusch (3): 141 | 142 | * Add documentation for server-jre distribution support starting with 7u80 in Java 7 tree 143 | * Add missing sha256sums for 7u80 server-jre distribution 144 | * Fixup wrong sha256sum for 7u80 JRE distribution (thx to WeVaSoft) 145 | 146 | # 1.5.0 147 | 148 | Alvaro Aleman (2): 149 | 150 | * Add \*.swp to gitignore 151 | * Add Java 7u80 support 152 | 153 | # 1.4.0 154 | 155 | Marc Rohlfs (3): 156 | 157 | * Added version var definition for latest Java version 8u60 and set it as role default. 158 | * Added version var definition for Java version 7u21. 159 | * Fixed path to keytool - it must not be hardcoded. 160 | 161 | Mark Kusch (7): 162 | 163 | * Update default Java version to 8u66 164 | * Remove redundant tasks 165 | * Add support for Oracle server-jre 166 | * Update documentation for server-jre support and default versions 167 | * Fix "the inline if-expression on line 1 evaluated to false and no else section was defined" 168 | * Use complex args coding style 169 | * Use true and false for boolean arguments 170 | 171 | Ruslan Tumarkin (1): 172 | 173 | * Add 8u65 as supported version 174 | 175 | # 1.3.0 176 | 177 | Alvaro Aleman (4): 178 | 179 | * Added always_run=yes to fact gathering tasks, introduced java_download tag 180 | * Readme: Added checkmode description 181 | * use true instead of yes for booleans 182 | * tdd functionality updated 183 | 184 | # 1.2.0 185 | 186 | Ludovic Claude (1): 187 | 188 | * Add Java 8u51 189 | 190 | # 1.1.1 191 | 192 | Mark Kusch (1): 193 | 194 | * Fix: stderr: fish: Expected a command name, got token of type “Run job in background”. 195 | 196 | # 1.1.0 197 | 198 | Mark Kusch (5): 199 | 200 | * Abstract supported platform in vars 201 | * Maintain default places where to find shasum binaries 202 | * Allow to configure shasum binary for local\_action: command when validating shasums 203 | 204 | # 1.0.0 205 | 206 | Marc Rohlfs (1): 207 | 208 | * Fixed markdown 209 | 210 | Mark Kusch (16): 211 | 212 | * Draft: Manage Java keystores with the keystore module 213 | * Create test SSL certificates with "usable" CN names 214 | * Add support for create=BOOLEANS argument 215 | * Make keytool= argument optional 216 | * Do not add compiled Python code to the repository 217 | * This role now requires ansible version 1.9 218 | * s/sudo/become/g and proper sudo management again 219 | * Add copy and creates arguments to keystore: module 220 | * Install custom keystore when running vagrant 221 | * Pre-checking shasums will not generate change events anymore 222 | * Use util\_package\_state configuration from util role when installing packages 223 | * Do not generate changed events when installing JCE 224 | 225 | # 0.10.0 226 | 227 | Travis Truman (1): 228 | 229 | * Adding vars for 8u45 230 | 231 | Mark Kusch (3): 232 | 233 | * Add example playbook and contribution documentation 234 | * Add supported versions to documentation and add trumant to contributors list 235 | * Default Java to 8u45 236 | 237 | # 0.9.0 238 | 239 | Mark Kusch (5): 240 | 241 | * Qualify galaxy meta data 242 | * Allow ansible-galaxy install to install required dependencies 243 | * Documentation for groover.util role dependency 244 | * Implement util_template_use_cow variable to templates 245 | * Use capabilities of groover.util role 246 | 247 | # 0.8.0 248 | 249 | Marc Rohlfs (3): 250 | 251 | * Variables that should be overwritable must be moved to defaults/main.yml. 252 | * Replaced hard coded patch version with proper variable substitution. 253 | * Added version var definition for latest Java version 8u31 and set it as role default. 254 | 255 | # 0.7.0 256 | 257 | Mark Kusch (1): 258 | 259 | * Add compatibility notes to documentation 260 | 261 | Marc Rohlfs (4): 262 | 263 | * Improved patterns for files to be ignored by Git. 264 | * Removed obsolete files. 265 | * Improved and simplified configuration of the Java version. 266 | * Changed name of var ``java_default_distribution`` to ``java_oracle_distribution``. 267 | 268 | # 0.6.0 269 | 270 | Mark Kusch (2): 271 | 272 | * Add support to install JCE policy for unlimited strength cryptography 273 | 274 | # 0.5.1 275 | 276 | Mark Kusch (9): 277 | 278 | * Update ubuntu-upstart-sshkey container to version 1.0.0 279 | * Provide cow in ansible managed templates 280 | * This role will not deal with OpenJDK anymore for complexity reasons 281 | * Cleanup defaults/ vs vars/ 282 | * Proper sudo management (based on github#4) 283 | * Provide build/test instructions for travis (based on github#4) 284 | * Update integration testing to work with Serverspec 2.N 285 | * Update Java to install 7u71 by default 286 | * Add support for current java 8u25 (build 17) 287 | 288 | Sebastian Davids (1): 289 | 290 | * MOD - add missing java_oracle_version_update role variable 291 | 292 | # 0.5.0 293 | 294 | Mark Kusch (15): 295 | 296 | * Update variables documentation 297 | * Add integration test infrastructure 298 | * Persistent java_home fact 299 | * Basic documentation for the java_home fact 300 | * Fix java facts 301 | * Update documentation formatting 302 | * Enable custom local facts for other roles 303 | * Do not add runtime facts 304 | * Revert removal of runtime facts 305 | * Provide some usage documentation for custom local facts 306 | * Allow configuration of curl cookie for automated Oracle distribution downloads 307 | * Move role version to dedicated file 308 | * Remove variables from ansible_ scope to prevent clashes 309 | * Update task description for local ansible data path directory creation 310 | * Fix wrong tag name (thx to review) 311 | 312 | # 0.0.1 313 | 314 | * Initial commit. 315 | 316 | 317 | 318 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rake' 4 | gem 'serverspec' 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2014 Silpion IT Solutions GmbH 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # silpion.java 2 | 3 | Install Oracle Java. 4 | 5 | # Synopsis 6 | 7 | ```yaml 8 | - name: Install Java 8u102 JDK to /opt/java 9 | hosts: all 10 | roles: 11 | - role: silpion.java 12 | ``` 13 | 14 | ```yaml 15 | - name: Install Java server-jre to /usr/local/java 16 | hosts: all 17 | roles: 18 | - role: silpion.java 19 | java_oracle_distribution: srv 20 | java_install_dir: /usr/local/java 21 | ``` 22 | 23 | ```yaml 24 | - name: Install Java JRE 8u60 25 | hosts: all 26 | roles: 27 | - role: silpion.java 28 | java_oracle_version: 8u60 29 | java_oracle_distribution: jre 30 | ``` 31 | 32 | # Description 33 | 34 | The role downloads redistributable packages from the internet 35 | to the hosts local filesystem before it may install those on 36 | any number of managed nodes in the local network. 37 | 38 | Downloads are performed with the ``command`` module using ``curl``. 39 | It is required to have curl installed on the local host you 40 | are running ansible-playbook on to manage nodes (your workstation). 41 | 42 | Downloaded assets are verified based on SHA 256 checksums on 43 | the local workstation before getting copied to the managed node. 44 | 45 | The local shasum binary is guessed automatically but may get 46 | configured via ``java_shasum_binary: /path/to/shasum/binary``. 47 | 48 | For detailed configuration options see [Role Variables](#role_variables) 49 | documentation below. 50 | 51 | # Dependencies 52 | 53 | * [silpion.lib][1] 54 | * [silpion.util][2] 55 | 56 | roles. This is configured for the ``ansible-galaxy install`` command in 57 | **requirements.yml**. 58 | 59 | ```sh 60 | ansible-galaxy install --no-deps --role-file requirements.yml 61 | ``` 62 | 63 | # Role Variables 64 | 65 | * ``java_oracle_distribution``: Configure the Java distribution to be installed (default: ``jdk``, values: [``jdk``, ``jre``, ``srv``]) 66 | * ``java_oracle_version``: Configure Java version to be installed (string, default: ``8u66``) 67 | * ``java_install_dir``: Base installation directory for any Java implementation/distribution (string, default: ``/opt/java``) 68 | * ``java_shasum_binary``: Allows to configure shasum binary for local\_action: command (string, default: ``with_first_found: java_shasum_binaries`` (see ``vars/main.yml``)) 69 | * ``java_path_to_lib_role``: configure path to lib-role, which can get configured via silpion.lib role (string, default: ``{{ lib_roles_path }}``) 70 | 71 | Note: ``srv`` is an Ansible compatible shorthand for the Oracle ``server-jre``. 72 | 73 | ## Versioned variables 74 | 75 | Predefined SHA sums and further version specific configuration may get found in 76 | the ``vars/versions`` directory. When configuring a version, that is not predefined 77 | (so far), the following variables must also be defined in the playbook: 78 | 79 | * ``java_oracle_version_major``: Oracle major version 80 | * ``java_oracle_version_minor``: Oracle minor version 81 | * ``java_oracle_version_patch``: Oracle patch version 82 | * ``java_oracle_version_update``: Oracle major version 83 | * ``java_oracle_version_build``: Oracle build version 84 | * ``java_oracle_redis_jdk_sha256sum``: SHA256 sum for the downloaded Oracle Java JDK redistributable package - mandatory when ``java_oracle_distribution`` is ``jdk`` 85 | * ``java_oracle_redis_jre_sha256sum``: SHA256 sum for the downloaded Oracle Java JRE redistributable package - mandatory when ``java_oracle_distribution`` is ``jre`` 86 | * ``java_oracle_redis_srv_sha256sum``: SHA256 sum for the downloaded Oracle Java Server-JRE redistributable package - mandatory when ``java_oracle_distribution`` is ``srv`` 87 | * ``java_oracle_redis_jce_sha256sum``: SHA256 sum for the downloaded Oracle Java JCE policies package 88 | * ``java_oracle_mirror_jce``: Mirror URL for the download of the Oracle Java JCE policies package 89 | * ``java_oracle_redis_jce_filename``: File name of the Oracle Java JCE policies package 90 | * ``java_oracle_redis_jce_archive_dirname``: Name of the base directory in the Oracle Java JCE policies package 91 | 92 | ## Supported versions 93 | 94 | * 7u21 95 | * 7u51 96 | * 7u71 97 | * 7u80 98 | * 8u20 99 | * 8u25 100 | * 8u31 101 | * 8u45 102 | * 8u51 103 | * 8u60 104 | * 8u65 105 | * 8u66 106 | * 8u92 107 | * 8u101 108 | * 8u102 109 | 110 | Starting with 111 | 112 | * ``7u80`` (Java 7) 113 | * ``8u66`` (Java 8) 114 | 115 | configuration of ``java_oracle_distribution``: ``srv`` is available. 116 | 117 | # Role facts 118 | 119 | This role sets persistent facts for other roles to use via 120 | 121 | * facts.d ``ansible_local.java.general.java_home`` 122 | 123 | This variable contains the path to the default JVM configured with this role. 124 | 125 | # Checkmode 126 | 127 | Checkmode is supported provided that all assets have been downloaded. 128 | Otherwise, the copy tasks will fail. 129 | 130 | You can download the assets without making any changes on the remote nodes by executing this role with the ``java_download`` tag. 131 | 132 | # Contributing 133 | 134 | If you want to contribute to this repository please be aware that this 135 | project uses a [gitflow](http://nvie.com/posts/a-successful-git-branching-model/) 136 | workflow with the next release branch called ``next``. 137 | 138 | Please fork this repository and create a local branch split off of the ``next`` 139 | branch and create pull requests back to the origin ``next`` branch. 140 | 141 | # License 142 | 143 | Apache Version 2.0 144 | 145 | # Author 146 | 147 | * Mark Kusch @mark.kusch silpion.de 148 | * Marc Rohlfs @marc.rohlfs silpion.de 149 | * Alvaro Aleman @alvaro.aleman silpion.de 150 | 151 | ## Contributors 152 | 153 | * Lars Maehlmann @lars.maehlmann silpion.de 154 | * Sebastian Davids @sebastian.davids silpion.de 155 | * [ludovicc](https://github.com/ludovicc) 156 | * [nixlike](https://github.com/nixlike) 157 | * [trumant](https://github.com/trumant) 158 | 159 | 160 | 161 | [1]: https://github.com/silpion/ansible-lib 162 | [2]: https://github.com/silpion/ansible-util 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require 'rake' 2 | require 'rspec/core/rake_task' 3 | 4 | 5 | desc "Run integration tests with serverspec" 6 | RSpec::Core::RakeTask.new(:spec) do |t| 7 | t.pattern = 'spec/*/*_spec.rb' 8 | end 9 | 10 | 11 | desc "Test ansible playbook syntax" 12 | task :lint do 13 | sh %{ansible-playbook --inventory-file tests/hosts --syntax-check tests/test.yml} 14 | end 15 | task :default => :lint 16 | 17 | 18 | desc "vagrant up --no-provision" 19 | task :up do 20 | if ENV['ANSIBLE_JAVA_VAGRANT_PROVIDER'] 21 | sh 'vagrant', 'up', '--no-provision', '--provider', ENV['ANSIBLE_JAVA_VAGRANT_PROVIDER'] 22 | else 23 | sh %{vagrant up --no-provision} 24 | end 25 | end 26 | 27 | desc "vagrant halt; vagrant destroy --force" 28 | task :clean do 29 | if ENV['RAKE_ANSIBLE_VAGRANT_DONT_CLEANUP'] != '1' 30 | sh %{vagrant halt} 31 | sh %{vagrant destroy --force} 32 | end 33 | end 34 | 35 | desc "vagrant provision" 36 | task :provision => :up do 37 | sh %{vagrant provision} 38 | end 39 | 40 | desc "Run test suite with Vagrant" 41 | task :suite => [ 42 | :lint, 43 | :up, 44 | :provision, 45 | :spec, 46 | :clean 47 | ] 48 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 224 2 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # vim: set ft=ruby ts=2 sw=2 et: 2 | # -*- mode: ruby -*- 3 | 4 | 5 | VAGRANT_API_VERSION = '2' 6 | Vagrant.configure(VAGRANT_API_VERSION) do |config| 7 | 8 | # user based configuration with nugrant 9 | # - vagrant plugin: https://github.com/maoueh/nugrant 10 | # 11 | # defaults for user configurable items 12 | cfg = { 13 | 'vm' => { 14 | 'box' => 'centos/7', 15 | 'check_update' => false, 16 | 'synced_folders' => false 17 | }, 18 | 'provisioner' => { 19 | 'ansible' => { 20 | 'verbose' => nil, 21 | 'diff' => nil, 22 | 'ask_sudo_pass' => false, 23 | 'ask_vault_pass' => false 24 | } 25 | } 26 | } 27 | 28 | if Vagrant.has_plugin?('nugrant') 29 | # get defaults from cfg as user defaults 30 | config.user.defaults = cfg 31 | c = config.user 32 | else 33 | c = cfg 34 | end 35 | 36 | 37 | # vm configuration 38 | config.vm.box = ENV['ANSIBLE_JAVA_VAGRANT_BOXNAME'] || c['vm']['box'] 39 | config.vm.box_check_update = c['vm']['check_update'] 40 | 41 | config.vm.define :ansiblejavatest do |d| 42 | 43 | d.vm.hostname = 'ansiblejavatest' 44 | if not c['vm']['synced_folders'] 45 | d.vm.synced_folder '.', '/vagrant', id: 'vagrant-root', disabled: true 46 | d.vm.synced_folder '.', '/home/vagrant/sync', id: 'vagrant-root', disabled: true 47 | end 48 | 49 | # provisioner configuration 50 | d.vm.provision :ansible do |ansible| 51 | # configure ansible-galaxy 52 | ansible.galaxy_roles_path = 'tests/roles/:../' 53 | ansible.galaxy_role_file = 'tests/requirements.yml' 54 | ansible.galaxy_command = 'ansible-galaxy install --role-file=%{role_file} --roles-path=tests/roles/ --ignore-errors --force' 55 | 56 | # configure ansible-playbook 57 | ansible.playbook = 'tests/test.yml' 58 | ansible.groups = { 59 | 'vagrant' => ['ansiblejavatest'] 60 | } 61 | ansible.limit = 'vagrant' 62 | 63 | # dynamic ansible-playbook configuration based on environment variables 64 | ansible.tags = ENV['ANSIBLE_JAVA_VAGRANT_ANSIBLE_TAGS'] 65 | ansible.skip_tags = ENV['ANSIBLE_JAVA_VAGRANT_ANSIBLE_SKIP_TAGS'] 66 | # dynamic ansible-playbook configuration based on environment variables or user configuration 67 | ansible.verbose = ENV['ANSIBLE_JAVA_VAGRANT_ANSIBLE_VERBOSE'] || c['provisioner']['ansible']['verbose'] 68 | 69 | # ansible-playbook raw arguments 70 | ansible.raw_arguments = [] 71 | 72 | if ENV['ANSIBLE_JAVA_VAGRANT_ANSIBLE_CHECKMODE'] == '1' 73 | ansible.raw_arguments << '--check' 74 | end 75 | 76 | if ENV['ANSIBLE_JAVA_VAGRANT_ANSIBLE_DIFFMODE'] == '1' or c['provisioner']['ansible']['diff'] 77 | ansible.raw_arguments << '--diff' 78 | end 79 | 80 | end 81 | 82 | d.vm.provider :virtualbox do |v| 83 | v.customize 'pre-boot', ['modifyvm', :id, '--nictype1', 'virtio'] 84 | v.customize [ 'modifyvm', :id, '--name', 'ansiblejavatest', '--memory', '1024', '--cpus', '1' ] 85 | end 86 | 87 | d.vm.provider :libvirt do |lv| 88 | lv.memory = 1024 89 | lv.cpus = 1 90 | end 91 | 92 | end 93 | 94 | end 95 | -------------------------------------------------------------------------------- /action_plugins/keystore.py: -------------------------------------------------------------------------------- 1 | # (c) 2015, Mark Kusch 2 | 3 | from __future__ import (absolute_import, division, print_function) 4 | __metaclass__ = type 5 | import os 6 | from ansible.plugins.action import ActionBase 7 | 8 | 9 | class ActionModule(ActionBase): 10 | 11 | TRANSFER_FILES = True 12 | 13 | def run(self, tmp=None, task_vars=None): 14 | ''' handler for file transfer operations ''' 15 | 16 | if task_vars is None: 17 | task_vars = dict() 18 | result = super(ActionModule, self).run(tmp, task_vars) 19 | 20 | crt = self._task.args.get('crt', None) 21 | copy = self._task.args.get('copy', True) 22 | creates = self._task.args.get('creates', None) 23 | 24 | # this module requires at least the crt= to be present 25 | if crt is None: 26 | result['failed'] = True 27 | result['msg'] = "crt is required" 28 | return result 29 | 30 | remote_user = task_vars.get('ansible_ssh_user') or self._play_context.remote_user 31 | if not tmp: 32 | tmp = self._make_tmp_path(remote_user) 33 | 34 | # skip if creates= is added to the module and the destination file already exists 35 | if creates: 36 | result = self._execute_module(module_name='stat', module_args=dict(path=creates), task_vars=task_vars) 37 | stat = result.get('stat', None) 38 | 39 | if stat and stat.get('exists', False): 40 | result['skipped'] = True 41 | result['msg'] = "skipped, since %s exists" % creates 42 | return result 43 | 44 | crt = os.path.expanduser(crt) 45 | 46 | # copy files 47 | if copy: 48 | source = self._loader.path_dwim_relative(self._loader.get_basedir(), 'files', crt) 49 | 50 | dest = tmp + os.path.basename(source) 51 | self._connection.put_file(source, dest) 52 | 53 | if self._play_context.become and self._play_context.become_user != 'root': 54 | if not self._play_context.check_mode: 55 | self._remote_chmod('a+r', dest) 56 | 57 | 58 | new_module_args = self._task.args.copy() 59 | new_module_args.update( 60 | dict( 61 | crt=dest, 62 | ), 63 | ) 64 | 65 | else: 66 | new_module_args = self._task.args.copy() 67 | 68 | # run keystore module 69 | result.update(self._execute_module(module_args=new_module_args, task_vars=task_vars)) 70 | return result 71 | -------------------------------------------------------------------------------- /ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | roles_path = tests/roles/:../ 3 | nocows = 1 4 | retry_files_enabled = 0 5 | host_key_checking = 0 6 | -------------------------------------------------------------------------------- /defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Default Java distribution. 3 | # Go for the JDK here in favor of a JRE only. 4 | # Choices: 5 | # - jdk 6 | # - jre 7 | java_oracle_distribution: "{{ ansible_local.java.general.distribution if (((ansible_local|default({})).java|default({})).general|default({})).distribution is defined else 'jdk' }}" 8 | 9 | # Cookie data for curl to allow automatic download of Oracle distribution 10 | java_oracle_curl_cookie: accept-securebackup-cookie 11 | 12 | # Version informations required for download 13 | java_oracle_version: "{{ ansible_local.java.general.version if (((ansible_local|default({})).java|default({})).general|default({})).version is defined else '8u131' }}" 14 | java_oracle_version_major: 1 15 | java_oracle_version_minor: 8 16 | java_oracle_version_patch: 0 17 | java_oracle_version_update: 131 18 | java_oracle_version_build: 11 19 | java_oracle_version_mirror_hash: d54c1d3a095b4ff2b6607d096fa80163 20 | 21 | 22 | # Base installation directory for any Java implementation/distribution 23 | java_install_dir: /opt/java 24 | 25 | # Whether to use a cow in templates rather than {# ansible_managed #} 26 | java_template_use_cow: "{{ util_template_use_cow|default(true) }}" 27 | 28 | # path to lib role 29 | java_path_to_lib_role: "{{ lib_roles_path|default(playbook_dir + '/roles') }}" 30 | 31 | 32 | java_oracle_redis_mirror: "{{ java_oracle_mirror }}/{{ java_oracle_version }}-b{{ java_oracle_version_build }}/{{ java_oracle_version_mirror_hash }}/{{ java_oracle_redis_filename }}" 33 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/{{ java_oracle_version_minor }}" 34 | java_oracle_redis_jce_filename: jce_policy-{{ java_oracle_version_minor }}.zip 35 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicyJDK{{ java_oracle_version_minor }} 36 | 37 | # Helper variables for Oracle to keep code readable 38 | # top level directory within the Oracle redis archive 39 | java_oracle_version_str_pkg: "{{ 'jdk' if java_oracle_distribution == 'srv' else java_oracle_distribution }}{{ java_oracle_version_major }}.{{ java_oracle_version_minor }}.{{ java_oracle_version_patch }}_{{ java_oracle_version_update }}" 40 | 41 | # source file name for either the JRE, JDK or Server JRE for the Oracle Java implementation 42 | java_oracle_redis_filename: "{{ 'server-jre' if java_oracle_distribution == 'srv' else java_oracle_distribution }}-{{ java_oracle_version }}-linux-x64.tar.gz" 43 | 44 | # where to install the JCE extensions to 45 | java_oracle_jce_install_dir: "{{ java_install_dir }}/oracle/{{ java_oracle_version_str_pkg }}/{{ '/jre' if java_oracle_distribution in ('jdk', 'srv') else '' }}/lib/security" 46 | -------------------------------------------------------------------------------- /envvars-vagrant.sample: -------------------------------------------------------------------------------- 1 | export RAKE_ANSIBLE_USE_VAGRANT=1 2 | export ANSIBLE_JAVA_VAGRANT_BOXNAME=centos/7 # name of the vagrant box to use for testing 3 | export ANSIBLE_JAVA_VAGRANT_PROVIDER=virtualbox # name of the vagrant provider to use for testing 4 | #export ANSIBLE_JAVA_VAGRANT_ANSIBLE_TAGS= # Multiple tags can be specified comma seperated 5 | unset ANSIBLE_JAVA_VAGRANT_ANSIBLE_TAGS # An empty tags variable leads to an error 6 | #export ANSIBLE_JAVA_VAGRANT_ANSIBLE_SKIP_TAGS= # Multiple tags can be specified comma seperated 7 | unset ANSIBLE_JAVA_VAGRANT_ANSIBLE_SKIP_TAGS # An empty skip_tags variable leads to an error 8 | export ANSIBLE_JAVA_VAGRANT_ANSIBLE_VERBOSE= # May contain one to four 'v's 9 | export ANSIBLE_JAVA_VAGRANT_ANSIBLE_CHECKMODE= # 1 to enable, any other value to disable 10 | export ANSIBLE_JAVA_VAGRANT_ANSIBLE_DIFFMODE= # 1 to enable, any other value to disable 11 | -------------------------------------------------------------------------------- /library/keystore.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | 4 | # (c) Mark Kusch 5 | 6 | 7 | DOCUMENTATION = ''' 8 | --- 9 | module: keystore 10 | short_description: Manage certificates with Java jks keystore 11 | extends_documentation_fragment: files 12 | description: 13 | - The M(keystore) module allows to install and uninstall certificates in a Java keystore with keytool 14 | options: 15 | state: 16 | description: 17 | - Whether a certificate should be C(present) or C(absent) 18 | required: false 19 | default: present 20 | choices: [present, absent] 21 | path: 22 | description: 23 | - Path to the keystore file beeing managed. Aliases: I(dest) 24 | required: true 25 | default: None 26 | aliases: ['dest', 'name'] 27 | create: 28 | description: 29 | - Whether to create a new keystore if it does not exist. 30 | required: false 31 | default: true 32 | alias: 33 | description: 34 | - Alias name or ID for the certificate inside the keystore. 35 | required: true 36 | default: None 37 | crt: 38 | description: 39 | - Path to a file containing the SSL certificate, mandatory when state=present 40 | required: false 41 | default: None 42 | password: 43 | description: 44 | - Password for the keystore 45 | required: true 46 | default: None 47 | keytool: 48 | description: 49 | - Path to a Java keytool for performing operations (required when keytool not in PATH) 50 | required: false 51 | default: None 52 | copy: 53 | description: 54 | - Whether to copy files to the remote host 55 | required: false 56 | default: True 57 | creates: 58 | description: 59 | - A filename, when it already exists, this step will B(not) be run. 60 | # informational: requirements for nodes 61 | requirements: [] 62 | author: Mark Kusch 63 | todo: 64 | - implementation for truststore vs keystore 65 | - whether to install pkcs12 and convert to jks with openssl 66 | notes: 67 | - requires keytool either in $PATH or supplied with keytool= argument 68 | - does not allow to install private keys 69 | ''' 70 | 71 | 72 | EXAMPLES = ''' 73 | - keystore: state=present path=/etc/app/cacerts owner=foo group=foo mode=0644 alias=foo crt=/tmp/app.crt 74 | - keystore: state=absent dest=/etc/app/cacerts alias=bar 75 | ''' 76 | 77 | 78 | import os 79 | 80 | 81 | class Keystore(object): 82 | 83 | def __init__(self, module, keytool): 84 | self.module = module 85 | self.state = module.params['state'] 86 | self.path = os.path.expanduser(module.params['path']) 87 | self.create = module.boolean(module.params['create']) 88 | self.alias = module.params['alias'] 89 | self.crt = os.path.expanduser(module.params['crt']) 90 | self.keytool = keytool 91 | self.password = module.params['password'] 92 | self.copy = module.boolean(module.params['copy']) 93 | self.creates = module.params['creates'] 94 | self.file_args = module.load_file_common_arguments(module.params) 95 | 96 | def exists(self): 97 | return os.path.isfile(self.path) 98 | 99 | def is_crt(self): 100 | if self.exists(): 101 | cmd = [self.keytool] 102 | cmd.append('-noprompt') 103 | cmd.append('-list') 104 | cmd.append('-keystore') 105 | cmd.append(self.path) 106 | cmd.append('-storepass') 107 | cmd.append(self.password) 108 | cmd.append('-alias') 109 | cmd.append(self.alias) 110 | (rc, out, err) = self.module.run_command(cmd) 111 | if rc == 0: 112 | return True 113 | return False 114 | 115 | 116 | def crt_add(self): 117 | if not self.is_crt(): 118 | if not self.crt: 119 | self.module.fail_json(name=self.alias, msg='crt is required when adding certificates') 120 | else: 121 | cmd = [self.keytool] 122 | cmd.append('-noprompt') 123 | cmd.append('-keystore') 124 | cmd.append(self.path) 125 | cmd.append('-trustcacerts') 126 | cmd.append('-import') 127 | cmd.append('-file') 128 | cmd.append(self.crt) 129 | cmd.append('-alias') 130 | cmd.append(self.alias) 131 | cmd.append('-storepass') 132 | cmd.append(self.password) 133 | return self.module.run_command(cmd) 134 | 135 | def crt_del(self): 136 | if self.is_crt(): 137 | cmd = [self.keytool] 138 | cmd.append('-noprompt') 139 | cmd.append('-keystore') 140 | cmd.append(self.path) 141 | cmd.append('-storepass') 142 | cmd.append(self.password) 143 | cmd.append('-alias') 144 | cmd.append(self.alias) 145 | cmd.append('-delete') 146 | return self.module.run_command(cmd) 147 | 148 | def set_fs_attributes_if_different(self, changed): 149 | return self.module.set_fs_attributes_if_different(self.file_args, changed) 150 | 151 | 152 | def main(): 153 | module = AnsibleModule( 154 | argument_spec = dict( 155 | state = dict(required=False, choices=['present', 'absent'], type='str', default='present'), 156 | path = dict(required=True, aliases=['name', 'dest'], type='str'), 157 | create = dict(required=False, type='bool', default=True), 158 | alias = dict(required=True, type='str'), 159 | crt = dict(required=False, type='str', default=None), 160 | keytool = dict(required=False, type='str', default=None), 161 | password = dict(required=True, type='str', default=None), 162 | copy = dict(required=False, type='bool', default=True), 163 | creates = dict(required=False, type='str', default=None), 164 | ), 165 | add_file_common_args=True, 166 | supports_check_mode=True 167 | ) 168 | 169 | 170 | keytool = None 171 | keytool = module.get_bin_path('keytool', False) 172 | if keytool is None and module.params['keytool'] is not None: 173 | if os.path.isfile(module.params['keytool']) and os.access(module.params['keytool'], os.X_OK): 174 | keytool = module.params['keytool'] 175 | if keytool is None: 176 | module.fail_json(msg='cannot execute keytool: no such file or directory') 177 | 178 | 179 | keystore = Keystore(module, keytool) 180 | rc = None 181 | out = '' 182 | err = '' 183 | result = {} 184 | result['path'] = keystore.path 185 | result['state'] = keystore.state 186 | 187 | 188 | if not os.path.exists(keystore.crt): 189 | if keystore.copy: 190 | module.fail_json(msg="File '%s' failed to transfer" % os.path.basename(keystore.crt)) 191 | if not os.access(keystore.crt, os.R_OK): 192 | module.fail_json(msg="File '%s' is not readable" % os.path.basename(keystore.crt)) 193 | 194 | 195 | if keystore.state == 'absent': 196 | if keystore.is_crt(): 197 | if module.check_mode: 198 | module.exit_json(changed=True) 199 | (rc, out, err) = keystore.crt_del() 200 | if rc != 0: 201 | module.fail_json(name=keystore.alias, msg=err) 202 | 203 | 204 | elif keystore.state == 'present': 205 | if not keystore.is_crt(): 206 | if not keystore.exists() and not keystore.create: 207 | module.exit_json(changed=False, msg='Not creating new keystore (use create=yes)') 208 | if module.check_mode: 209 | module.exit_json(changed=True) 210 | (rc, out, err) = keystore.crt_add() 211 | if rc != 0: 212 | module.fail_json(name=keystore.alias, msg=err) 213 | 214 | 215 | keystore.set_fs_attributes_if_different(rc) 216 | 217 | if rc is None: 218 | result['changed'] = False 219 | else: 220 | result['changed'] = True 221 | if out: 222 | result['out'] = out 223 | if err: 224 | result['err'] = err 225 | 226 | module.exit_json(**result) 227 | 228 | 229 | from ansible.module_utils.basic import * 230 | if __name__ == '__main__': 231 | main() 232 | -------------------------------------------------------------------------------- /meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Setup dependencies here: 3 | # Dependencies are pulled into the play and executed in order 4 | # of appearance. 5 | dependencies: 6 | - src: https://github.com/silpion/ansible-util 7 | name: silpion.util 8 | 9 | 10 | # https://galaxy.ansibleworks.com 11 | # Meta information required when uploading a role to the 12 | # galaxy. 13 | galaxy_info: 14 | author: Mark Kusch 15 | description: Manage Java installation 16 | company: http://silpion.de 17 | license: Apache 2 18 | min_ansible_version: 2.1.0.0 19 | 20 | # 21 | # Below are all platforms currently available. Just uncomment 22 | # the ones that apply to your role. If you don't see your 23 | # platform on this list, let us know and we'll get it added! 24 | # 25 | platforms: 26 | - name: EL 27 | versions: 28 | - 6 29 | - 7 30 | - name: Fedora 31 | versions: 32 | - 20 33 | - 21 34 | - 22 35 | - name: Ubuntu 36 | versions: 37 | - trusty 38 | - name: Debian 39 | versions: 40 | - wheezy 41 | 42 | # Below are all categories currently available. Just as with 43 | # the platforms above, uncomment those that apply to your role. 44 | # 45 | categories: 46 | - development 47 | -------------------------------------------------------------------------------- /requirements.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - src: https://github.com/silpion/ansible-util 3 | name: silpion.util 4 | -------------------------------------------------------------------------------- /scripts/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ##Always exit on $? -ne 0 4 | set -e 5 | ## 6 | 7 | _cleanup() 8 | { 9 | rm $FILENAME_TMPCHANGELOG &>/dev/null 10 | } 11 | 12 | ##### Create a release for a project managed with a Git repository ##### 13 | 14 | 15 | 16 | ### Functions ### 17 | 18 | # Confirm dialog for user interactions 19 | # Usage: confirm "Question?" 20 | # Returns: 0 = true, 1 = false 21 | confirm() { 22 | read -r -p "$1 [y/n] " response 23 | case $response in 24 | [yY][eE][sS]|[yY]) 25 | return 0;; 26 | *) 27 | return 1;; 28 | esac 29 | } 30 | 31 | ### Display usage message 32 | usage () { 33 | echo "Usage: $0 [-v VERSION] [-r REMOTE] -s 'One line summary of changes for this release'" 34 | exit 0 35 | } 36 | 37 | 38 | ### Initialize the variables and settings ### 39 | #Variables 40 | RELEASE_VERSION= 41 | REMOTE= 42 | SHORT_SUMMARY= 43 | 44 | while getopts v:r:s: OPT; do 45 | case $OPT in 46 | v) RELEASE_VERSION="${OPTARG}";; 47 | r) REMOTE="${OPTARG}";; 48 | s) SHORT_SUMMARY="${OPTARG}";; 49 | esac 50 | done 51 | shift $(( $OPTIND - 1 )); 52 | 53 | if [ -z "${SHORT_SUMMARY}" ]; then 54 | usage && exit 0 55 | fi 56 | 57 | : ${REMOTE:=origin} 58 | 59 | FILENAME_TMPCHANGELOG="$( mktemp --suffix=ansible_role_release_changelog )" 60 | 61 | trap _cleanup ALRM HUP INT TERM EXIT 62 | 63 | # Fetch Git remote inormation 64 | git fetch $REMOTE --tags 65 | 66 | # Some information can be detected 67 | LAST_VERSION=$( git tag -l | tail -n 1 ) 68 | REPOSITORY_NAME=$( git remote show -n $REMOTE | grep Fetch | sed 's#.*/##' | sed 's/\.git//' ) 69 | EXISTING_TAGS=`git tag -l` 70 | 71 | # Detect version if not provided by user 72 | if [[ -z "${RELEASE_VERSION}" ]]; then 73 | RELEASE_VERSION=$(echo $LAST_VERSION|awk -F . '{print $1 "." $2 + 1 "." $3}') 74 | fi 75 | 76 | RELEASE_BRANCH="release/${RELEASE_VERSION}" 77 | # Check if there is already a tag named $RELEASE_VERSION 78 | ## Temporary disabling exit on $? -ne 0 to be able to display error message 79 | set +e 80 | if [[ $EXISTING_TAGS =~ "$RELEASE_VERSION" ]]; then 81 | >&2 echo "A tag $RELEASE_VERSION already exists!" 82 | >&2 echo "Aborting.." 83 | exit 1 84 | fi 85 | set -e 86 | 87 | 88 | # Confirm or exit 89 | echo 90 | echo "Settings for the release to be created:" 91 | echo " Version of last release: ${LAST_VERSION}" 92 | echo " Version of new release: ${RELEASE_VERSION}" 93 | echo " Name of Git repository: ${REPOSITORY_NAME}" 94 | echo " Summary text for release: ${SHORT_SUMMARY}" 95 | if ! confirm "Continue with these settings?"; then 96 | exit 1 97 | fi 98 | 99 | 100 | 101 | ### Perform release ### 102 | 103 | echo 104 | echo "Checkout and pull next branch" 105 | git checkout next 106 | git pull $REMOTE next 107 | 108 | echo 109 | echo "Checkout new release branch" 110 | git checkout -b ${RELEASE_BRANCH} 111 | 112 | echo 113 | echo "Write VERSION file" 114 | echo ${RELEASE_VERSION} > VERSION 115 | 116 | echo 117 | echo "Add release information to CHANGELOG.md file" 118 | 119 | cat CHANGELOG.md > $FILENAME_TMPCHANGELOG 120 | echo "# ${RELEASE_VERSION}" > CHANGELOG.md 121 | echo "" >> CHANGELOG.md 122 | 123 | if [[ -n ${LAST_VERSION} ]]; then 124 | tac <(git shortlog --no-merges next --not ${LAST_VERSION} | sed -e '/^[ \t]/s#^[ \t]*#* #' | perl -pe 's/:$/:\n/g') >> CHANGELOG.md 125 | cat $FILENAME_TMPCHANGELOG >> CHANGELOG.md 126 | else 127 | tac <(git shortlog --no-merges next | sed -e '/^[ \t]/s#^[ \t]*#* #' | perl -pe 's/:$/:\n/g') >> CHANGELOG.md 128 | cat $FILENAME_TMPCHANGELOG >> CHANGELOG.md 129 | fi 130 | echo "Please verify and adjust version information that was prepended to CHANGELOG.md file" 131 | echo "Diff looks like this:" 132 | echo 133 | echo '###### Diff start ######' 134 | 135 | ## Disable exit on $? -ne 0 for the diff command, since it returns $? == 1 if a diff was found 136 | set +e 137 | diff -u $FILENAME_TMPCHANGELOG CHANGELOG.md 138 | set -e 139 | 140 | echo '###### Diff end ######' 141 | echo 142 | echo "In case this is not correct, press ctrl+z to pause this script, adjust CHANGELOG.md and get back using the fg command" 143 | while ! confirm "Continue?"; do 144 | echo "And now?" 145 | done 146 | 147 | echo 148 | echo "Commit generated release information" 149 | rm -f $FILENAME_TMPCHANGELOG 150 | git add VERSION 151 | git add CHANGELOG.md 152 | git commit -m "${REPOSITORY_NAME} ${RELEASE_VERSION}: ${SHORT_SUMMARY}" 153 | 154 | echo 155 | echo "Checkout and pull master branch" 156 | git checkout master 157 | git pull $REMOTE master 158 | 159 | echo 160 | echo "Merge release branch to master branch" 161 | git merge --no-ff --log --no-edit ${RELEASE_BRANCH} 162 | 163 | echo 164 | echo "Create release tag ${RELEASE_VERSION}" 165 | git tag -a ${RELEASE_VERSION} -m "${REPOSITORY_NAME} ${RELEASE_VERSION}: ${SHORT_SUMMARY}" 166 | 167 | echo 168 | echo "Merge release branch to next branch" 169 | git checkout next 170 | git merge ${RELEASE_BRANCH} 171 | 172 | echo 173 | echo "Delete release branch - it's obsolete now" 174 | git branch -d ${RELEASE_BRANCH} 175 | 176 | echo 177 | echo "Push all changes to remote repository" 178 | git push $REMOTE master next ${RELEASE_VERSION} 179 | exit 0 180 | -------------------------------------------------------------------------------- /spec/default/java_spec.rb: -------------------------------------------------------------------------------- 1 | # http://serverspec.org/resource_types.html 2 | # http://serverspec.org/advanced_tips.html 3 | 4 | # testing operating system specific 5 | # 6 | # either: 7 | # 8 | # if os[:family] == 'redhat' 9 | # if os[:release] == 7 10 | # if os[:arch] == 'x86_64' 11 | # 12 | # nested: 13 | # if os[:family] == 'redhat' 14 | # if os[:release] == 7 15 | # describe resource(...) do 16 | # end 17 | # else 18 | # describe resource(...) do 19 | # end 20 | # end 21 | # 22 | # or: 23 | # 24 | # describe file('...'), :if => os[:family] == 'archlinux' do ... end 25 | # 26 | # or multiple OS share the same test data 27 | # 28 | # describe file('...'), :if => ['archlinux', 'redhat'].include?(os[:family]) do ... end 29 | 30 | require 'spec_helper' 31 | 32 | describe 'Testing ansible-java local facts' do 33 | describe file('/etc/ansible/facts.d/java.fact') do 34 | it { should be_file } 35 | it { should be_mode '644' } 36 | it { should be_owned_by 'root' } 37 | it { should be_grouped_into 'root' } 38 | its(:content) { should match /vendor = "Silpion"/ } 39 | its(:content) { should match /vendor_url = "http:\/\/silpion.de"/ } 40 | its(:content) { should match /vendor_github = "https:\/\/github.com\/silpion"/ } 41 | its(:content) { should match /role_version=2.2.1/ } 42 | its(:content) { should match /java_home=\/opt\/java\/oracle\/jdk1.8.0_102/ } 43 | its(:content) { should match /version=8u102/ } 44 | its(:content) { should match /distribution=srv/ } 45 | end 46 | end 47 | -------------------------------------------------------------------------------- /spec/lib/vagrant.rb: -------------------------------------------------------------------------------- 1 | class Vagrant 2 | 3 | private 4 | 5 | @ssh_host = nil 6 | @ssh_user = nil 7 | @ssh_keys = nil 8 | @ssh_port = nil 9 | 10 | def initialize 11 | c = `vagrant ssh-config` 12 | if c != '' 13 | c.each_line do |l| 14 | if m = /hostname (.*)/i.match(l) 15 | @ssh_host = m[1] 16 | elsif m = /user (.*)/i.match(l) 17 | @ssh_user = m[1] 18 | elsif m = /identityfile (.*)/i.match(l) 19 | @ssh_keys = [m[1].gsub(/"/, '')] 20 | elsif m = /port (.*)/i.match(l) 21 | @ssh_port = m[1] 22 | end 23 | end 24 | end 25 | end 26 | 27 | public 28 | attr_reader :ssh_host, :ssh_user, :ssh_keys, :ssh_port 29 | 30 | end 31 | -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'serverspec' 2 | require 'lib/vagrant' 3 | 4 | c = Vagrant.new 5 | 6 | set :backend, :ssh 7 | set :host, c.ssh_host 8 | set :ssh_options, :user => c.ssh_user, :port => c.ssh_port, :keys => c.ssh_keys 9 | 10 | set :env, :LANG => 'C', :LC_MESSAGES => 'C' 11 | set :path, '/usr/local/sbin:/usr/sbin:/sbin:$PATH' 12 | -------------------------------------------------------------------------------- /tasks/download.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Download Oracle Java 3 | # 4 | # Installing Java while fetching the distribution from Oracle is 5 | # a nightmare. 6 | # 7 | # Version information is a huge mess with Oracle Java. Naming of 8 | # files, directories and zip archives is never consistent and one 9 | # never knows what they are up to next. 10 | # 11 | # What this does is trying to use Ansible capabilities while 12 | # allowing a re-usable installation of the Oracle Java JDK. 13 | 14 | # Download the Java distribution from Oracle to the workstations' 15 | # filesystem. Yeah, right, accept license agreement... 16 | # This allows to distribute Java to any number of hosts in the 17 | # context of a local network instead of downloading Java again 18 | # for every role/node which depends on this role. 19 | - name: Download Oracle Java redis packages 20 | tags: 21 | - java 22 | - java_download 23 | become: "{{ util_local_action_become_enable|default(omit) }}" 24 | become_user: "{{ util_local_action_become_user|default(omit) }}" 25 | become_method: "{{ util_local_action_become_method|default(omit) }}" 26 | register: java_oracle_redis_download 27 | with_items: 28 | - { file: "{{ java_oracle_redis_filename }}", uri: "{{ java_oracle_redis_mirror }}" } 29 | - { file: "{{ java_oracle_redis_jce_filename }}", uri: "{{ java_oracle_mirror_jce }}/{{ java_oracle_redis_jce_filename }}" } 30 | local_action: command 31 | curl 32 | --location 33 | --insecure 34 | --remote-name 35 | --connect-timeout 4 36 | --retry 2 37 | --retry-delay 4 38 | --cookie oraclelicense={{ java_oracle_curl_cookie }} 39 | --cookie-jar /tmp/{{ java_oracle_redis_filename }}.cookie 40 | {{ item.uri }} 41 | args: 42 | chdir: "{{ lib_persistent_data_path_local }}" 43 | creates: "{{ lib_persistent_data_path_local }}/{{ item.file }}" 44 | 45 | # Fixup possible users umask issues 46 | - name: Ensure downloaded archives are world readable 47 | tags: 48 | - java 49 | - java_download 50 | become: "{{ util_local_action_become_enable|default(omit) }}" 51 | become_user: "{{ util_local_action_become_user|default(omit) }}" 52 | become_method: "{{ util_local_action_become_method|default(omit) }}" 53 | with_items: 54 | - "{{ java_oracle_redis_filename }}" 55 | - "{{ java_oracle_redis_jce_filename }}" 56 | local_action: file 57 | args: 58 | dest: "{{ lib_persistent_data_path_local }}/{{ item }}" 59 | mode: 0644 60 | -------------------------------------------------------------------------------- /tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Assert platform is supported 3 | tags: 4 | - java 5 | - java_download 6 | assert: 7 | that: 8 | - ansible_os_family in java_supported_platform 9 | - ansible_architecture in ['x86_64'] 10 | 11 | - name: Assert java_oracle_distribution value 12 | tags: 13 | - java 14 | - java_download 15 | assert: 16 | that: 17 | - java_oracle_distribution in ('jdk', 'jre', 'srv') 18 | 19 | - name: Configure initial --check_mode fact 20 | tags: 21 | - java 22 | - java_download 23 | when: 24 | - ansible_check_mode 25 | - not (ansible_local|default({})).java is defined 26 | set_fact: 27 | java_fact_initial_check_mode: true 28 | 29 | 30 | - name: Include version specific configuration 31 | tags: 32 | - java 33 | - java_download 34 | include: "{{ java_path_to_lib_role }}/silpion.lib/tasks/version-specific-vars.yml" 35 | vars: 36 | version: "{{ java_oracle_version }}" 37 | 38 | 39 | - name: Include OS specific configuration 40 | tags: java 41 | include: "{{ java_path_to_lib_role }}/silpion.lib/tasks/os-specific-vars.yml" 42 | 43 | 44 | - name: Include assets persistency tasks 45 | tags: java 46 | include: "{{ java_path_to_lib_role }}/silpion.lib/tasks/datapersistency.yml" 47 | 48 | 49 | # Manage local download of Oracle Java redistributable 50 | - name: Manage download of Java redistributables 51 | include: download.yml 52 | when: not ansible_check_mode 53 | tags: 54 | - java 55 | - download 56 | - java_download 57 | 58 | 59 | - name: Install required packages 60 | tags: java 61 | become: true 62 | with_items: "{{ java_package_list }}" 63 | package: 64 | state: "{{ util_package_state|default('present') }}" 65 | name: "{{ item }}" 66 | 67 | 68 | # Install Oracle Java JDK 69 | 70 | # Directory for unarchiving the configured version of Java. 71 | - name: Install Java base directory 72 | tags: java 73 | become: true 74 | file: 75 | state: directory 76 | owner: 0 77 | group: 0 78 | mode: 0755 79 | dest: "{{ java_install_dir }}/oracle" 80 | 81 | # Install the Oracle redistributable package to the node 82 | - name: Copy Java redistributable packages 83 | tags: java 84 | when: not ansible_check_mode 85 | with_items: 86 | - "{{ java_oracle_redis_filename }}" 87 | - "{{ java_oracle_redis_jce_filename }}" 88 | include: "{{ java_path_to_lib_role }}/silpion.lib/tasks/copy.yml" 89 | vars: 90 | filename: "{{ item }}" 91 | 92 | - name: Install Java 93 | tags: java 94 | become: true 95 | when: not ansible_check_mode 96 | unarchive: 97 | src: "{{ lib_persistent_data_path_remote }}/{{ java_oracle_redis_filename }}" 98 | dest: "{{ java_install_dir }}/oracle/" 99 | copy: false 100 | creates: "{{ java_install_dir }}/oracle/{{ java_oracle_version_str_pkg }}" 101 | 102 | - name: Unarchive Java JCE package 103 | tags: java 104 | when: not ansible_check_mode 105 | unarchive: 106 | src: "{{ lib_persistent_data_path_remote }}/{{ java_oracle_redis_jce_filename }}" 107 | dest: /tmp/ 108 | copy: false 109 | creates: /tmp/{{ java_oracle_redis_jce_archive_dirname }} 110 | 111 | 112 | - name: Install Java JCE policies 113 | tags: java 114 | become: true 115 | when: not ansible_check_mode 116 | changed_when: false 117 | with_items: 118 | - local_policy.jar 119 | - US_export_policy.jar 120 | command: install 121 | --owner root 122 | --group root 123 | --mode 0644 124 | /tmp/{{ java_oracle_redis_jce_archive_dirname }}/{{ item }} 125 | {{ java_oracle_jce_install_dir }}/{{ item }} 126 | 127 | 128 | 129 | # Archives may be packaged with some useless uid and gid 130 | - name: Fixup filesystem permissions 131 | tags: java 132 | become: true 133 | file: 134 | state: directory 135 | owner: 0 136 | group: 0 137 | recurse: true 138 | dest: "{{ java_install_dir }}" 139 | 140 | 141 | - name: Include local facts tasks 142 | tags: java 143 | include: "{{ java_path_to_lib_role }}/silpion.lib/tasks/localfacts.yml" 144 | vars: 145 | namespace: java 146 | 147 | 148 | # Configure Java installation as system wide default Java 149 | - name: Install Java default implementation 150 | tags: java 151 | become: true 152 | template: 153 | src: java.sh.j2 154 | dest: "{{ java_install_dir }}/java.sh" 155 | owner: 0 156 | group: 0 157 | mode: 0755 158 | 159 | - name: Activate Java system environment configuration 160 | tags: java 161 | become: true 162 | when: not ansible_check_mode 163 | file: 164 | state: link 165 | src: "{{ java_install_dir }}/java.sh" 166 | dest: /etc/profile.d/java.sh 167 | -------------------------------------------------------------------------------- /templates/facts.j2: -------------------------------------------------------------------------------- 1 | {% if java_template_use_cow %} 2 | # -------------------- 3 | # ( Managed by Ansible ) 4 | # -------------------- 5 | # o . . . 6 | # o . . . ` , 7 | # o .; . : .' : : : . 8 | # o i..`: i` i.i.,i i . 9 | # o `,--.|i |i|ii|ii|i: 10 | # UooU\.'@@@@@@`.||' 11 | # \__/(@@@@@@@@@@)' 12 | # (@@@@@@@@) 13 | # `YY~~~~YY' 14 | # || || 15 | {% else %} 16 | # {{ ansible_managed }} 17 | {% endif %} 18 | 19 | [general] 20 | vendor = "Silpion" 21 | vendor_url = "http://silpion.de" 22 | vendor_github = "https://github.com/silpion" 23 | role_version={{ java_role_version }} 24 | java_home={{ java_install_dir }}/oracle/{{ java_oracle_version_str_pkg }} 25 | version={{ java_oracle_version }} 26 | distribution={{ java_oracle_distribution }} 27 | -------------------------------------------------------------------------------- /templates/java.sh.j2: -------------------------------------------------------------------------------- 1 | {% if java_template_use_cow %} 2 | # -------------------- 3 | # ( Managed by Ansible ) 4 | # -------------------- 5 | # o . . . 6 | # o . . . ` , 7 | # o .; . : .' : : : . 8 | # o i..`: i` i.i.,i i . 9 | # o `,--.|i |i|ii|ii|i: 10 | # UooU\.'@@@@@@`.||' 11 | # \__/(@@@@@@@@@@)' 12 | # (@@@@@@@@) 13 | # `YY~~~~YY' 14 | # || || 15 | {% else %} 16 | # {{ ansible_managed }} 17 | {% endif %} 18 | 19 | if [ -z "$JAVA_HOME" ]; then 20 | JAVA_HOME="{{ java_install_dir }}/oracle/{{ java_oracle_version_str_pkg }}" 21 | fi 22 | 23 | PATH="${PATH}:${JAVA_HOME}/bin" 24 | 25 | export PATH 26 | export JAVA_HOME 27 | -------------------------------------------------------------------------------- /templates/sha256sum.j2: -------------------------------------------------------------------------------- 1 | {%- if java_oracle_distribution == 'jdk' -%} 2 | {{ java_oracle_redis_jdk_sha256sum }} *{{ lib_persistent_data_path_local }}/{{ java_oracle_redis_filename }} 3 | {%- endif %} 4 | {% if java_oracle_distribution == 'jre' -%} 5 | {{ java_oracle_redis_jre_sha256sum }} *{{ lib_persistent_data_path_local }}/{{ java_oracle_redis_filename }} 6 | {%- endif %} 7 | {% if java_oracle_distribution == 'srv' -%} 8 | {{ java_oracle_redis_srv_sha256sum }} *{{ lib_persistent_data_path_local }}/{{ java_oracle_redis_filename }} 9 | {%- endif %} 10 | 11 | {{ java_oracle_redis_jce_sha256sum }} *{{ lib_persistent_data_path_local }}/{{ java_oracle_redis_jce_filename }} 12 | -------------------------------------------------------------------------------- /tests/bar.foo.org.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICxTCCAi4CCQCxFrWZDYg5HTANBgkqhkiG9w0BAQsFADCBpjELMAkGA1UEBhMC 3 | REUxEDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcxHTAbBgNVBAoT 4 | FFNpbHBpb24gSVQgU29sdXRpb25zMRgwFgYDVQQLEw9EZXZlbG9wbWVudCBTU0wx 5 | FDASBgNVBAMTC2Jhci5mb28ub3JnMSQwIgYJKoZIhvcNAQkBFhV3ZWJtYXN0ZXJA 6 | YmFyLmZvby5vcmcwHhcNMTUwMzI0MTEzMzU1WhcNMjUwMzIxMTEzMzU1WjCBpjEL 7 | MAkGA1UEBhMCREUxEDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcx 8 | HTAbBgNVBAoTFFNpbHBpb24gSVQgU29sdXRpb25zMRgwFgYDVQQLEw9EZXZlbG9w 9 | bWVudCBTU0wxFDASBgNVBAMTC2Jhci5mb28ub3JnMSQwIgYJKoZIhvcNAQkBFhV3 10 | ZWJtYXN0ZXJAYmFyLmZvby5vcmcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB 11 | AJ3Qwn1c4986yg0U4xB8Vu373HO5Gbov1mw7FPDuDoXblnKXtF0hsn8oCixytNG9 12 | 3CxVnlDR2qNXrLJ5R1+Pd483r2bSNATdStcDjgmqtCikCaE0LfkglOqayE7J+xxF 13 | jGTTnQ4jeSMSVD2Eh/8aG6+MfPAYJ8UxebmE/cl0BvMRAgMBAAEwDQYJKoZIhvcN 14 | AQELBQADgYEAaERlPz9ZOVd1HKUqKF1gAf6cq5jACkhrdniZfGJg3vJz6s7/dlvM 15 | bBNRWupoFNA6+OvdRwtvmSGt0l4C+muiMtnPqMlFHJbeQuVkw7e6hO3nLT6ol5O8 16 | Q4kxn1qt0tzVG+4UmMq3TaHUmLGCd4r7bpXLnRWmNG2tiEUZsrFUw5o= 17 | -----END CERTIFICATE----- 18 | -------------------------------------------------------------------------------- /tests/foo.bar.org.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICxTCCAi4CCQC4i8RCwxUJ4zANBgkqhkiG9w0BAQsFADCBpjELMAkGA1UEBhMC 3 | REUxEDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcxHTAbBgNVBAoT 4 | FFNpbHBpb24gSVQgU29sdXRpb25zMRgwFgYDVQQLEw9EZXZlbG9wbWVudCBTU0wx 5 | FDASBgNVBAMTC2Zvby5iYXIub3JnMSQwIgYJKoZIhvcNAQkBFhV3ZWJtYXN0ZXJA 6 | Zm9vLmJhci5vcmcwHhcNMTUwMzI0MTEzMzU1WhcNMjUwMzIxMTEzMzU1WjCBpjEL 7 | MAkGA1UEBhMCREUxEDAOBgNVBAgTB0hhbWJ1cmcxEDAOBgNVBAcTB0hhbWJ1cmcx 8 | HTAbBgNVBAoTFFNpbHBpb24gSVQgU29sdXRpb25zMRgwFgYDVQQLEw9EZXZlbG9w 9 | bWVudCBTU0wxFDASBgNVBAMTC2Zvby5iYXIub3JnMSQwIgYJKoZIhvcNAQkBFhV3 10 | ZWJtYXN0ZXJAZm9vLmJhci5vcmcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB 11 | ANx1Gemhidx5g+tCIRl7wXUrxg5DCOts+UWF0c9u5oGKBqsre5NSiH+9xW9/ZrZO 12 | hQBZ89AaA0vncC7mBWn/sxycoSebgZrtMOn0smCybbFcXVJTS4/5wmUcohPM9rwC 13 | AWAo4J/QpvblHsVpFnn6bKzeEuD+7RGZqjIQd3tlxEVfAgMBAAEwDQYJKoZIhvcN 14 | AQELBQADgYEAxqMzWRZgcke/m908rgh6nH13KOtQSox/oW8dngZzWUyQYZu/0Q0f 15 | qNIJRKmSfnhvNkmGCXiMnTp0pdrEMSRcBPmYUdxju3YdTM3YPZvu5J2oXxnEcQJb 16 | UGaWOiBeEr2gpg1uQSgiCKa2hnLupuZP76csFyIs7r4Qf917OyzIjMY= 17 | -----END CERTIFICATE----- 18 | -------------------------------------------------------------------------------- /tests/hosts: -------------------------------------------------------------------------------- 1 | localhost -------------------------------------------------------------------------------- /tests/requirements.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - src: https://github.com/silpion/ansible-util 3 | name: silpion.util 4 | -------------------------------------------------------------------------------- /tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Test silpion/ansible-java role with current default versions 3 | hosts: all 4 | roles: 5 | - role: ansible-java 6 | -------------------------------------------------------------------------------- /vars/Debian.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_package_list: 3 | - unzip 4 | -------------------------------------------------------------------------------- /vars/RedHat.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_package_list: 3 | - unzip 4 | -------------------------------------------------------------------------------- /vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_role_version: "{{ lookup('file', role_path + '/VERSION') }}" 3 | java_fact_initial_checkmode: false 4 | 5 | java_supported_platform: 6 | - Debian 7 | - RedHat 8 | 9 | # Where to download Oracle Java implementation from 10 | java_oracle_mirror_base: 'http://download.oracle.com/otn-pub/java' 11 | java_oracle_mirror: "{{ java_oracle_mirror_base }}/jdk" 12 | -------------------------------------------------------------------------------- /vars/versions/7u21.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_oracle_version_major: 1 3 | java_oracle_version_minor: 7 4 | java_oracle_version_patch: 0 5 | java_oracle_version_update: 21 6 | java_oracle_version_build: 11 7 | 8 | java_oracle_redis_jdk_sha256sum: 390700b531491ab51c00432517ac8739b7a61c9817fcde3650aa6dbd9b21c056 9 | java_oracle_redis_jre_sha256sum: 27c846d070884f30084f212c8ca76af272177efc460304503bfaa488ff1ad8f1 10 | java_oracle_redis_jce_sha256sum: 7a8d790e7bd9c2f82a83baddfae765797a4a56ea603c9150c87b7cdb7800194d 11 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/7" 12 | java_oracle_redis_jce_filename: UnlimitedJCEPolicyJDK7.zip 13 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicy 14 | -------------------------------------------------------------------------------- /vars/versions/7u51.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_oracle_version_major: '1' 3 | java_oracle_version_minor: '7' 4 | java_oracle_version_patch: '0' 5 | java_oracle_version_update: '51' 6 | java_oracle_version_build: '13' 7 | 8 | java_oracle_redis_jdk_sha256sum: '77367c3ef36e0930bf3089fb41824f4b8cf55dcc8f43cce0868f7687a474f55c' 9 | java_oracle_redis_jre_sha256sum: 'a8ef4fd8403398f9c2579bb97b5e6643661dabd510e4c3b79529ede9e1f8584a' 10 | java_oracle_redis_jce_sha256sum: '7a8d790e7bd9c2f82a83baddfae765797a4a56ea603c9150c87b7cdb7800194d' 11 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/7" 12 | java_oracle_redis_jce_filename: UnlimitedJCEPolicyJDK7.zip 13 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicy 14 | -------------------------------------------------------------------------------- /vars/versions/7u71.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_oracle_version_major: '1' 3 | java_oracle_version_minor: '7' 4 | java_oracle_version_patch: '0' 5 | java_oracle_version_update: '71' 6 | java_oracle_version_build: '14' 7 | 8 | java_oracle_redis_jdk_sha256sum: '80d5705fc37fc4eabe3cea480e0530ae0436c2c086eb8fc6f65bb21e8594baf8' 9 | java_oracle_redis_jre_sha256sum: '6d64e223a8da17efc098b71aa194c8d909faad432f3536a0cde57ca63b7bb017' 10 | java_oracle_redis_jce_sha256sum: '7a8d790e7bd9c2f82a83baddfae765797a4a56ea603c9150c87b7cdb7800194d' 11 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/7" 12 | java_oracle_redis_jce_filename: UnlimitedJCEPolicyJDK7.zip 13 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicy 14 | -------------------------------------------------------------------------------- /vars/versions/7u80.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_oracle_version_major: '1' 3 | java_oracle_version_minor: '7' 4 | java_oracle_version_patch: '0' 5 | java_oracle_version_update: '80' 6 | java_oracle_version_build: '15' 7 | 8 | java_oracle_redis_jdk_sha256sum: 'bad9a731639655118740bee119139c1ed019737ec802a630dd7ad7aab4309623' 9 | java_oracle_redis_jre_sha256sum: '4c01efd0d8e80bb6e2f324ec3408ce64f066d4506c7ec93a491f615a4523f4f3' 10 | java_oracle_redis_srv_sha256sum: 'd0c822763bf3fc38d4b8966b8498628baec31d9b3ac596fc987dd89b6de92e02' 11 | java_oracle_redis_jce_sha256sum: '7a8d790e7bd9c2f82a83baddfae765797a4a56ea603c9150c87b7cdb7800194d' 12 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/7" 13 | java_oracle_redis_jce_filename: UnlimitedJCEPolicyJDK7.zip 14 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicy 15 | -------------------------------------------------------------------------------- /vars/versions/8u101.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_oracle_version_major: 1 3 | java_oracle_version_minor: 8 4 | java_oracle_version_patch: 0 5 | java_oracle_version_update: 101 6 | java_oracle_version_build: 13 7 | 8 | java_oracle_redis_jdk_sha256sum: 467f323ba38df2b87311a7818bcbf60fe0feb2139c455dfa0e08ba7ed8581328 9 | java_oracle_redis_jre_sha256sum: 33026a91f4acb751979f05a5c72b65feaabd5b5c18604e62bc94d2feea7f7523 10 | java_oracle_redis_srv_sha256sum: 92ac6a6a1e00cc1ab551970ad7e28ddd4630def70f5aff5e0386c33dc7de11a7 11 | java_oracle_redis_jce_sha256sum: f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59 12 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/8" 13 | java_oracle_redis_jce_filename: jce_policy-8.zip 14 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicyJDK8 15 | -------------------------------------------------------------------------------- /vars/versions/8u102.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_oracle_version_major: 1 3 | java_oracle_version_minor: 8 4 | java_oracle_version_patch: 0 5 | java_oracle_version_update: 102 6 | java_oracle_version_build: 14 7 | 8 | java_oracle_redis_jdk_sha256sum: 7cfbe0bc0391a4abe60b3e9eb2a541d2315b99b9cb3a24980e618a89229e04b7 9 | java_oracle_redis_jre_sha256sum: 214ff6b52f5b1bccfc139dca910cea25f6fa19b9b96b4e3c10e699cd3e780dfb 10 | java_oracle_redis_srv_sha256sum: 50bc7ff61ba064c471adc2ec08e44690f0dac4cd673a3666b6d7b24a48bd7169 11 | java_oracle_redis_jce_sha256sum: f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59 12 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/8" 13 | java_oracle_redis_jce_filename: jce_policy-8.zip 14 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicyJDK8 15 | -------------------------------------------------------------------------------- /vars/versions/8u111.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_oracle_version_major: 1 3 | java_oracle_version_minor: 8 4 | java_oracle_version_patch: 0 5 | java_oracle_version_update: 111 6 | java_oracle_version_build: 14 7 | 8 | java_oracle_redis_jdk_sha256sum: 187eda2235f812ddb35c352b5f9aa6c5b184d611c2c9d0393afb8031d8198974 9 | java_oracle_redis_jre_sha256sum: a9576f50db99dbb980864ace29e4cf9157b86f68067bda04b8ae52ddf3e6b072 10 | java_oracle_redis_srv_sha256sum: 53442420cd9534ded4beca16c32c1d109cf5add637db764c86660c6eea1d88d4 11 | java_oracle_redis_jce_sha256sum: f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59 12 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/8" 13 | java_oracle_redis_jce_filename: jce_policy-8.zip 14 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicyJDK8 15 | -------------------------------------------------------------------------------- /vars/versions/8u112.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_oracle_version_major: 1 3 | java_oracle_version_minor: 8 4 | java_oracle_version_patch: 0 5 | java_oracle_version_update: 112 6 | java_oracle_version_build: 15 7 | 8 | java_oracle_redis_jdk_sha256sum: 777bd7d5268408a5a94f5e366c2e43e720c6ce4fe8c59d9a71e2961e50d774a5 9 | java_oracle_redis_jre_sha256sum: 94053c6aa4d672b728c7788fb7d2676e5c6d7e7fcdbc1c86beaa796a083b4e5b 10 | java_oracle_redis_srv_sha256sum: eb51dc02c1607be94249dc28b0223be3712b618ef72f48d3e2bfd2645db8b91a 11 | java_oracle_redis_jce_sha256sum: f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59 12 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/8" 13 | java_oracle_redis_jce_filename: jce_policy-8.zip 14 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicyJDK8 15 | -------------------------------------------------------------------------------- /vars/versions/8u121.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_oracle_version_major: 1 3 | java_oracle_version_minor: 8 4 | java_oracle_version_patch: 0 5 | java_oracle_version_update: 121 6 | java_oracle_version_build: 13 7 | 8 | java_oracle_redis_jdk_sha256sum: 97e30203f1aef324a07c94d9d078f5d19bb6c50e638e4492722debca588210bc 9 | java_oracle_redis_jre_sha256sum: 30bf5fbac0cfbc9201cac1d6973dbc96e5f55043ab315eda8c7aeb23df4f2644 10 | java_oracle_redis_srv_sha256sum: c25a60d02475499109f2bd6aa483721462aa7bfbb86b23ca6ac59be472747e5d 11 | java_oracle_redis_jce_sha256sum: f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59 12 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/8" 13 | java_oracle_redis_jce_filename: jce_policy-8.zip 14 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicyJDK8 15 | 16 | java_oracle_redis_mirror: "{{ java_oracle_mirror }}/{{ java_oracle_version }}-b{{ java_oracle_version_build }}/e9e7ea248e2c4826b92b3f075a80e441/{{ java_oracle_redis_filename }}" 17 | -------------------------------------------------------------------------------- /vars/versions/8u20.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_oracle_version_major: '1' 3 | java_oracle_version_minor: '8' 4 | java_oracle_version_patch: '0' 5 | java_oracle_version_update: '20' 6 | java_oracle_version_build: '26' 7 | 8 | java_oracle_redis_jdk_sha256sum: '3e717622ae48af5ca7298e7797cb71d4d545238f362741a83e69c097ca055de4' 9 | java_oracle_redis_jre_sha256sum: '23f149928ae7d7f97d9b93eb859f197744ffad2d4082a96fcde24021a08cab34' 10 | java_oracle_redis_jce_sha256sum: 'f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59' 11 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/8" 12 | java_oracle_redis_jce_filename: jce_policy-8.zip 13 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicyJDK8 14 | -------------------------------------------------------------------------------- /vars/versions/8u25.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_oracle_version_major: '1' 3 | java_oracle_version_minor: '8' 4 | java_oracle_version_patch: '0' 5 | java_oracle_version_update: '25' 6 | java_oracle_version_build: '17' 7 | 8 | java_oracle_redis_jdk_sha256sum: '057f660799be2307d2eefa694da9d3fce8e165807948f5bcaa04f72845d2f529' 9 | java_oracle_redis_jre_sha256sum: 'fbf3b9ddd4ae534ead10411bc425a0faf460118aadff480bca366888c1cf879f' 10 | java_oracle_redis_jce_sha256sum: 'f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59' 11 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/8" 12 | java_oracle_redis_jce_filename: jce_policy-8.zip 13 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicyJDK8 14 | -------------------------------------------------------------------------------- /vars/versions/8u31.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_oracle_version_major: 1 3 | java_oracle_version_minor: 8 4 | java_oracle_version_patch: 0 5 | java_oracle_version_update: 31 6 | java_oracle_version_build: 13 7 | 8 | java_oracle_redis_jdk_sha256sum: efe015e8402064bce298160538aa1c18470b78603257784ec6cd07ddfa98e437 9 | java_oracle_redis_jre_sha256sum: 236903524103db776f604aed1f07bca7907876218e803da7688b8e46f8155b24 10 | java_oracle_redis_jce_sha256sum: f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59 11 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/8" 12 | java_oracle_redis_jce_filename: jce_policy-8.zip 13 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicyJDK8 14 | -------------------------------------------------------------------------------- /vars/versions/8u45.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_oracle_version_major: 1 3 | java_oracle_version_minor: 8 4 | java_oracle_version_patch: 0 5 | java_oracle_version_update: 45 6 | java_oracle_version_build: 14 7 | 8 | java_oracle_redis_jdk_sha256sum: f298ca9239051dfddf8642fcc9e264f7fe5af10adb67027feb3a0ed0a1a2316d 9 | java_oracle_redis_jre_sha256sum: c156128cd92eb91e9320f61a8f36305b3382043afe3467304c6abd044d27da0a 10 | java_oracle_redis_jce_sha256sum: f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59 11 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/8" 12 | java_oracle_redis_jce_filename: jce_policy-8.zip 13 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicyJDK8 14 | -------------------------------------------------------------------------------- /vars/versions/8u51.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_oracle_version_major: 1 3 | java_oracle_version_minor: 8 4 | java_oracle_version_patch: 0 5 | java_oracle_version_update: 51 6 | java_oracle_version_build: 16 7 | 8 | java_oracle_redis_jdk_sha256sum: d7149012cc51c2cdb8d3a1767825e0dfc36ca0419c3dae56d993cb2732cbeff1 9 | java_oracle_redis_jre_sha256sum: c156128cd92eb91e9320f61a8f36305b3382043afe3467304c6abd044d27da0a 10 | java_oracle_redis_jce_sha256sum: f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59 11 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/8" 12 | java_oracle_redis_jce_filename: jce_policy-8.zip 13 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicyJDK8 14 | -------------------------------------------------------------------------------- /vars/versions/8u60.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_oracle_version_major: 1 3 | java_oracle_version_minor: 8 4 | java_oracle_version_patch: 0 5 | java_oracle_version_update: 60 6 | java_oracle_version_build: 27 7 | 8 | java_oracle_redis_jdk_sha256sum: ebe51554d2f6c617a4ae8fc9a8742276e65af01bd273e96848b262b3c05424e5 9 | java_oracle_redis_jre_sha256sum: 49dadecd043152b3b448288a35a4ee6f3845ce6395734bacc1eae340dff3cbf5 10 | java_oracle_redis_jce_sha256sum: f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59 11 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/8" 12 | java_oracle_redis_jce_filename: jce_policy-8.zip 13 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicyJDK8 14 | -------------------------------------------------------------------------------- /vars/versions/8u65.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_oracle_version_major: 1 3 | java_oracle_version_minor: 8 4 | java_oracle_version_patch: 0 5 | java_oracle_version_update: 65 6 | java_oracle_version_build: 17 7 | 8 | java_oracle_redis_jdk_sha256sum: 88db2aacdc222c2add4d92822f528b7a2101552272db4487f33b38b0b47826e7 9 | java_oracle_redis_jre_sha256sum: f8eae8d294e5856403f9ff0e306074f4f83d26c91c4c902f6c23c3d018ffc23f 10 | java_oracle_redis_jce_sha256sum: f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59 11 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/8" 12 | java_oracle_redis_jce_filename: jce_policy-8.zip 13 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicyJDK8 14 | -------------------------------------------------------------------------------- /vars/versions/8u66.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_oracle_version_major: 1 3 | java_oracle_version_minor: 8 4 | java_oracle_version_patch: 0 5 | java_oracle_version_update: 66 6 | java_oracle_version_build: 17 7 | 8 | java_oracle_redis_jdk_sha256sum: 7e95ad5fa1c75bc65d54aaac9e9986063d0a442f39a53f77909b044cef63dc0a 9 | java_oracle_redis_jre_sha256sum: f2249370a6ac4ca8977b66d7665179f0fef4df732f3af80b0f34567d594588bf 10 | java_oracle_redis_srv_sha256sum: 073f2bdcb3b993f756772f4225bf05b6006516bf1d7d1672fb2ec2aff4e83736 11 | java_oracle_redis_jce_sha256sum: f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59 12 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/8" 13 | java_oracle_redis_jce_filename: jce_policy-8.zip 14 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicyJDK8 15 | -------------------------------------------------------------------------------- /vars/versions/8u92.yml: -------------------------------------------------------------------------------- 1 | --- 2 | java_oracle_version_major: 1 3 | java_oracle_version_minor: 8 4 | java_oracle_version_patch: 0 5 | java_oracle_version_update: 92 6 | java_oracle_version_build: 14 7 | 8 | java_oracle_redis_jdk_sha256sum: 79a3f25e9b466cb9e969d1772ea38550de320c88e9119bf8aa11ce8547c39987 9 | java_oracle_redis_jre_sha256sum: e8469bcf55e388770cd6b6a51b082ce7a5a3149b4039a71b1edeed2796dcefe4 10 | java_oracle_redis_srv_sha256sum: 30608baff3bb3b09ea65fab603aae1c58f1381d7bb9d1b9af3dec9d499cabcc3 11 | java_oracle_redis_jce_sha256sum: f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59 12 | java_oracle_mirror_jce: "{{ java_oracle_mirror_base }}/jce/8" 13 | java_oracle_redis_jce_filename: jce_policy-8.zip 14 | java_oracle_redis_jce_archive_dirname: UnlimitedJCEPolicyJDK8 15 | -------------------------------------------------------------------------------- /vars/versions/default.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # This file is included, when no vars/versions/{{ version }}.yml exists for the 3 | # configured version. It doesn't define any variable so that the variables for 4 | # versions that are not predefined can be defined in the inventory. 5 | --------------------------------------------------------------------------------