Last active
February 26, 2018 21:21
-
-
Save jairojunior/be1e28676c7fa788975bac45940c1d31 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - hosts: all | |
| become: yes | |
| become_user: jboss | |
| vars: | |
| jboss_home: /opt/jboss-eap-6.4 | |
| patch_file: jboss-eap-6.4.9-patch.zip | |
| patch_dest: /tmp | |
| patch_version: 6.4.9 | |
| environment: | |
| JAVA_HOME: /etc/alternatives/java_sdk/ | |
| PATH: "{{ jboss_home }}/bin:/bin:/usr/bin:/sbin" | |
| tasks: | |
| - name: Copia patch para host alvo | |
| copy: | |
| src: "{{ patch_file }}" | |
| dest: "{{ patch_dest }}/{{ patch_file }}" | |
| - name: Verifica patches aplicados | |
| command: "jboss-cli.sh 'patch history'" | |
| register: result | |
| changed_when: "False" | |
| - name: Aplica patch | |
| command: "jboss-cli.sh 'patch apply {{ patch_dest }}/{{ patch_file }}'" | |
| when: patch_version not in result.stdout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment