Fixing some yaml-lint warnings

Scope of this commit is to fix warnings reported by
offline-installer-master-yaml-lint jenkins job

Change-Id: Id858a37ce35d53ad1ffd5e5797607faae484ed15
Issue-ID: OOM-1753
Signed-off-by: Michal Ptacek <m.ptacek@partner.samsung.com>
diff --git a/ansible/roles/certificates/handlers/main.yml b/ansible/roles/certificates/handlers/main.yml
new file mode 100644
index 0000000..b2b8122
--- /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 b2f1f94..b918187 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