summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorStefanie Forrester <dak1n1@users.noreply.github.com>2016-02-18 14:14:48 -0800
committerStefanie Forrester <dak1n1@users.noreply.github.com>2016-02-18 14:14:48 -0800
commit8658a12b5efdf3c8b9a601763858e622342e45f5 (patch)
tree4d85e586cdf9e2eaf01b92fe6f2818cddd0dee36 /playbooks
parente7cd8c3e17c8751c65a0d622101f7967943b7b2b (diff)
parenteff8db8b61d08503fcb65605f2f0a92f4962f76a (diff)
downloadopenshift-8658a12b5efdf3c8b9a601763858e622342e45f5.tar.gz
openshift-8658a12b5efdf3c8b9a601763858e622342e45f5.tar.bz2
openshift-8658a12b5efdf3c8b9a601763858e622342e45f5.tar.xz
openshift-8658a12b5efdf3c8b9a601763858e622342e45f5.zip
Merge pull request #1439 from xlr-8/master
Add extra parameters for S3 registry: delete file, create bucket.
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/adhoc/s3_registry/s3_registry.yml7
1 files changed, 6 insertions, 1 deletions
diff --git a/playbooks/adhoc/s3_registry/s3_registry.yml b/playbooks/adhoc/s3_registry/s3_registry.yml
index 38ce92e92..daf84e242 100644
--- a/playbooks/adhoc/s3_registry/s3_registry.yml
+++ b/playbooks/adhoc/s3_registry/s3_registry.yml
@@ -15,6 +15,9 @@
aws_secret_key: "{{ lookup('env', 'S3_SECRET_ACCESS_KEY') }}"
aws_bucket_name: "{{ aws_bucket | default(clusterid ~ '-docker') }}"
aws_bucket_region: "{{ aws_region | default(lookup('env', 'S3_REGION') | default('us-east-1', true)) }}"
+ aws_create_bucket: "{{ aws_create | default(True) }}"
+ aws_tmp_path: "{{ aws_tmp_pathfile | default('/root/config.yml')}}"
+ aws_delete_tmp_file: "{{ aws_delete_tmp | default(True) }}"
tasks:
@@ -30,6 +33,7 @@
command: oc scale --replicas=0 dc/docker-registry
- name: Create S3 bucket
+ when: aws_create_bucket | bool
local_action:
module: s3 bucket="{{ aws_bucket_name }}" mode=create
@@ -70,4 +74,5 @@
command: oc scale --replicas=1 dc/docker-registry
- name: Delete temporary config file
- file: path=/root/config.yml state=absent
+ file: path={{ aws_tmp_path }} state=absent
+ when: aws_delete_tmp_file | bool