summaryrefslogtreecommitdiffstats
path: root/playbooks/adhoc/s3_registry
diff options
context:
space:
mode:
authorJan Chaloupka <jchaloup@redhat.com>2017-02-09 13:50:29 +0100
committerJan Chaloupka <jchaloup@redhat.com>2017-02-10 12:15:58 +0100
commitb0f065dde8ddf14a8712a769152e63faea6688a3 (patch)
tree08be052eea6c179e6267588c6fc347a7387a3c5c /playbooks/adhoc/s3_registry
parentfc96d8d22f6c277b599e6e2fa4e9cc06814a9460 (diff)
downloadopenshift-b0f065dde8ddf14a8712a769152e63faea6688a3.tar.gz
openshift-b0f065dde8ddf14a8712a769152e63faea6688a3.tar.bz2
openshift-b0f065dde8ddf14a8712a769152e63faea6688a3.tar.xz
openshift-b0f065dde8ddf14a8712a769152e63faea6688a3.zip
Replace service account secrets handling with oc_serviceaccount_secret module
Diffstat (limited to 'playbooks/adhoc/s3_registry')
-rw-r--r--playbooks/adhoc/s3_registry/s3_registry.yml13
1 files changed, 8 insertions, 5 deletions
diff --git a/playbooks/adhoc/s3_registry/s3_registry.yml b/playbooks/adhoc/s3_registry/s3_registry.yml
index 2c79a1b4d..d6758dae5 100644
--- a/playbooks/adhoc/s3_registry/s3_registry.yml
+++ b/playbooks/adhoc/s3_registry/s3_registry.yml
@@ -51,13 +51,16 @@
command: oc secrets new dockerregistry /root/config.yml
when: "'dockerregistry' not in secrets.stdout"
- - name: Determine if service account contains secrets
- command: oc describe serviceaccount/registry
- register: serviceaccount
+ - name: Load lib_openshift modules
+ include_role:
+ name: lib_openshift
- name: Add secrets to registry service account
- command: oc secrets add serviceaccount/registry secrets/dockerregistry
- when: "'dockerregistry' not in serviceaccount.stdout"
+ oc_serviceaccount_secret:
+ service_account: registry
+ secret: dockerregistry
+ namespace: default
+ state: present
- name: Determine if deployment config contains secrets
command: oc volume dc/docker-registry --list