From 128491d154dc0a47a7f1341c9b8c69b12aaf6e3a Mon Sep 17 00:00:00 2001 From: Asara Date: Wed, 21 Oct 2020 21:25:52 -0400 Subject: [PATCH] Restart nexus after updating certs --- ansible/ansible.cfg | 2 +- ansible/roles/nexus/handlers/main.yml | 6 ++++++ ansible/roles/nexus/tasks/main.yml | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg index 872978e..56018d1 100644 --- a/ansible/ansible.cfg +++ b/ansible/ansible.cfg @@ -28,4 +28,4 @@ become_method = sudo become_user = root [diff] -always = yes +always = True diff --git a/ansible/roles/nexus/handlers/main.yml b/ansible/roles/nexus/handlers/main.yml index 475ef39..8d28a5a 100644 --- a/ansible/roles/nexus/handlers/main.yml +++ b/ansible/roles/nexus/handlers/main.yml @@ -3,3 +3,9 @@ service: name: consul state: reloaded + +- name: restart nexus + docker_container: + name: nexus + image: sonatype/nexus3 + restart: True diff --git a/ansible/roles/nexus/tasks/main.yml b/ansible/roles/nexus/tasks/main.yml index d3e35a2..cbbd14a 100644 --- a/ansible/roles/nexus/tasks/main.yml +++ b/ansible/roles/nexus/tasks/main.yml @@ -61,6 +61,7 @@ Verifying - Enter Export Password: - password when: cert_written.changed + notify: restart nexus - name: remove tmp keystore file: