summaryrefslogtreecommitdiffstats
path: root/ansible/roles/certificates
diff options
context:
space:
mode:
authorMichal Ptacek <m.ptacek@partner.samsung.com>2019-03-26 09:07:18 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-26 09:07:18 +0000
commitfc7ca30540c2cd926346b27c9d4656272ca70e96 (patch)
tree01d8842e9f6ad9d93b712eb83a7c660dae6629b0 /ansible/roles/certificates
parent63750134d02b6cdf34172afa055e44f65025fbc7 (diff)
parent200ae72c05772dab23923bc74c88c8691f7224fc (diff)
Merge "Fixing some yaml-lint warnings"
Diffstat (limited to 'ansible/roles/certificates')
-rw-r--r--ansible/roles/certificates/handlers/main.yml5
-rw-r--r--ansible/roles/certificates/tasks/upload_root_ca.yml9
2 files changed, 7 insertions, 7 deletions
diff --git a/ansible/roles/certificates/handlers/main.yml b/ansible/roles/certificates/handlers/main.yml
new file mode 100644
index 00000000..b2b81223
--- /dev/null
+++ b/ansible/roles/certificates/handlers/main.yml
@@ -0,0 +1,5 @@
+---
+- name: Extract root certificate
+ command: /usr/bin/update-ca-trust extract
+ changed_when: true # this handler is executed just when there is a new cert
+ notify: Restart Docker
diff --git a/ansible/roles/certificates/tasks/upload_root_ca.yml b/ansible/roles/certificates/tasks/upload_root_ca.yml
index b2f1f945..b918187d 100644
--- a/ansible/roles/certificates/tasks/upload_root_ca.yml
+++ b/ansible/roles/certificates/tasks/upload_root_ca.yml
@@ -3,10 +3,5 @@
copy:
src: "{{ certificates_local_dir }}/rootCA.crt"
dest: /etc/pki/ca-trust/source/anchors/
- register: copycert
- notify: Restart Docker
-
-- name: Extract root certificate
- command: /usr/bin/update-ca-trust extract
- when: copycert.changed
- notify: Restart Docker
+ notify: # handler is triggered just when file is changed
+ - Extract root certificate