summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-06-29 08:52:10 -0400
committerGitHub <noreply@github.com>2017-06-29 08:52:10 -0400
commitea678ad4ee999abd71c5a175810925cf6c3e42dd (patch)
tree78690eabae33f13b9104485e7e3257795a9d1aa0 /roles
parent2d7e10b02d8d4c400d242a1612ade3d15c69a57e (diff)
parent8e91ce82be1585c31401664c00d753035ed7f33e (diff)
downloadopenshift-ea678ad4ee999abd71c5a175810925cf6c3e42dd.tar.gz
openshift-ea678ad4ee999abd71c5a175810925cf6c3e42dd.tar.bz2
openshift-ea678ad4ee999abd71c5a175810925cf6c3e42dd.tar.xz
openshift-ea678ad4ee999abd71c5a175810925cf6c3e42dd.zip
Merge pull request #4602 from abutcher/named-cert-redeploy
Update master configuration for named certificates during master cert redeploy.
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_named_certificates/filter_plugins/openshift_named_certificates.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/roles/openshift_named_certificates/filter_plugins/openshift_named_certificates.py b/roles/openshift_named_certificates/filter_plugins/openshift_named_certificates.py
new file mode 100644
index 000000000..6ed6d404c
--- /dev/null
+++ b/roles/openshift_named_certificates/filter_plugins/openshift_named_certificates.py
@@ -0,0 +1,21 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+'''
+Custom filters for use with openshift named certificates
+'''
+
+
+class FilterModule(object):
+ ''' Custom ansible filters for use with openshift named certificates'''
+
+ @staticmethod
+ def oo_named_certificates_list(named_certificates):
+ ''' Returns named certificates list with correct fields for the master
+ config file.'''
+ return [{'certFile': named_certificate['certfile'],
+ 'keyFile': named_certificate['keyfile'],
+ 'names': named_certificate['names']} for named_certificate in named_certificates]
+
+ def filters(self):
+ ''' returns a mapping of filters to methods '''
+ return {"oo_named_certificates_list": self.oo_named_certificates_list}