Skip to content

Commit

Permalink
Fixed Nexus upgrade process (touch data/clean_cache)
Browse files Browse the repository at this point in the history
  • Loading branch information
samherve committed Sep 29, 2016
1 parent 999007f commit 08b43c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
nexus_version: '3.0.1-01'
nexus_version: '3.0.2-02'
nexus_package: "nexus-{{ nexus_version }}-unix.tar.gz"
nexus_download_dir: '/tmp'
nexus_os_group: 'nexus'
Expand Down
5 changes: 5 additions & 0 deletions tasks/nexus_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

- name: Update symlink nexus-latest
file: path="{{ nexus_installation_dir }}/nexus-latest" src="{{ nexus_installation_dir }}/nexus-{{ nexus_version }}" state=link
register: nexus_latest_version

- name: Delete unpacked data directory
file: path="{{ nexus_installation_dir }}/nexus-latest/data" state=absent
Expand Down Expand Up @@ -81,6 +82,10 @@
command: "ls {{ nexus_data_dir }}"
register: nexus_data_dir_contents

- name: Clean cache for upgrade process
file: path="{{ nexus_data_dir }}/clean_cache" state=touch
when: nexus_latest_version.changed and nexus_data_dir_contents.stdout != ""

- name: Reload systemd service configuration
shell: 'systemctl daemon-reload'

Expand Down

0 comments on commit 08b43c3

Please sign in to comment.