From ce3fd3b226ab8ae73194331508dafe49766f0cec Mon Sep 17 00:00:00 2001 From: Kevin TIBI Date: Mon, 13 Nov 2017 14:27:32 +0000 Subject: [PATCH] Add creation for directory CA docker --- ansible/roles/docker/tasks/config.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ansible/roles/docker/tasks/config.yml b/ansible/roles/docker/tasks/config.yml index 12032cca0..cd01d350f 100644 --- a/ansible/roles/docker/tasks/config.yml +++ b/ansible/roles/docker/tasks/config.yml @@ -6,6 +6,13 @@ become: True notify: restart docker service +- name: Ensure the path for CA file for private registry exists + file: + path: "/etc/docker/certs.d/{{ docker_registry }}" + state: directory + become: True + when: docker_registry is not none and docker_registry_ca is not none + - name: Ensure the CA file for private registry exists copy: src: "{{ docker_registry_ca }}"