--- - name: Copy root certificate 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