From b0f065dde8ddf14a8712a769152e63faea6688a3 Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Thu, 9 Feb 2017 13:50:29 +0100 Subject: Replace service account secrets handling with oc_serviceaccount_secret module --- playbooks/adhoc/s3_registry/s3_registry.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'playbooks') 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 -- cgit v1.2.3