summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorJan Chaloupka <jchaloup@redhat.com>2017-02-11 10:30:20 +0100
committerGitHub <noreply@github.com>2017-02-11 10:30:20 +0100
commit5444c0f474f3701f22ae8392d1ac192403c8b5b7 (patch)
treebb5d05ed9ecb1e9c20d1a9c4bc046fa8f47c818d /roles
parent9d25cb0280664f8bdef6247c8dc13520c90756da (diff)
parenta064a673ae40a4c5a62b6bf2d619d72bbc5fd967 (diff)
downloadopenshift-5444c0f474f3701f22ae8392d1ac192403c8b5b7.tar.gz
openshift-5444c0f474f3701f22ae8392d1ac192403c8b5b7.tar.bz2
openshift-5444c0f474f3701f22ae8392d1ac192403c8b5b7.tar.xz
openshift-5444c0f474f3701f22ae8392d1ac192403c8b5b7.zip
Merge pull request #3300 from ashcrow/oc-secret-module
WIP: oc secrets now done via oc_secret module
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_hosted/tasks/registry/secure.yml19
1 files changed, 11 insertions, 8 deletions
diff --git a/roles/openshift_hosted/tasks/registry/secure.yml b/roles/openshift_hosted/tasks/registry/secure.yml
index 84b69d94c..216a40874 100644
--- a/roles/openshift_hosted/tasks/registry/secure.yml
+++ b/roles/openshift_hosted/tasks/registry/secure.yml
@@ -43,15 +43,18 @@
when: False in (docker_registry_certificates_stat_result.results | default([]) | oo_collect(attribute='stat.exists') | list)
- name: Create the secret for the registry certificates
- command: >
- {{ openshift.common.client_binary }} secrets new registry-certificates
- {{ openshift_master_config_dir }}/registry.crt
- {{ openshift_master_config_dir }}/registry.key
- --config={{ openshift_hosted_kubeconfig }}
- -n default
+ oc_secret:
+ kubeconfig: "{{ openshift_hosted_kubeconfig }}"
+ name: registry-certificates
+ namespace: default
+ state: present
+ files:
+ - name: registry.crt
+ path: "{{ openshift_master_config_dir }}/registry.crt"
+ - name: registry.key
+ path: "{{ openshift_master_config_dir }}/registry.key"
register: create_registry_certificates_secret
- changed_when: "'already exists' not in create_registry_certificates_secret.stderr"
- failed_when: "'already exists' not in create_registry_certificates_secret.stderr and create_registry_certificates_secret.rc != 0"
+ run_once: true
- name: "Add the secret to the registry's pod service accounts"
oc_serviceaccount_secret: