From 9c7390a5a4dbb37d10b71a04e4d3373b28a68d4e Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Thu, 19 Oct 2017 00:57:45 +0000 Subject: [PATCH] Allow using files from the private repo in openshift secrets. --- roles/openshift/secret-file/tasks/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/openshift/secret-file/tasks/main.yml b/roles/openshift/secret-file/tasks/main.yml index 697ce185ae..20b55de91a 100644 --- a/roles/openshift/secret-file/tasks/main.yml +++ b/roles/openshift/secret-file/tasks/main.yml @@ -13,6 +13,11 @@ when: file is defined run_once: true +- name: Copy private file {{privatefile}} to temporary file ({{tmpfile.path}}) + copy: src={{private}}/files/{{privatefile}} dest={{tmpfile.path}} + when: privatefile is defined + run_once: true + - name: Call `oc secrets new` on the copied file shell: oc -n {{app}} secrets new {{secret_name}} {{key}}={{tmpfile.path}} run_once: true