summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/manage-ssl-certs.yml
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2018-09-03 17:21:52 +0100
committerFatih Degirmenci <fdegir@gmail.com>2018-09-04 05:59:43 +0000
commit680f203f5b37b10fbaaf69c04b983cf333c12dc6 (patch)
treeb56c9ece0436dee47729dc51aa5b9ed9b1615b0f /xci/playbooks/manage-ssl-certs.yml
parent933c7a0f36c970d24954b9ba1552a29a75b43976 (diff)
xci: osa: Restore self-signed XCI certificate
This reverts commit cc583f30f881ba956fb4f1402aa4dd1608b27da2. We still need to have control over the generated certificates so lets keep creating our own. deploy-scenario:os-nosdn-nofeature installer-type:osa Change-Id: I9e730bce2dba578ca0b561b168eaf1c2eca1282d
Diffstat (limited to 'xci/playbooks/manage-ssl-certs.yml')
-rw-r--r--xci/playbooks/manage-ssl-certs.yml32
1 files changed, 32 insertions, 0 deletions
diff --git a/xci/playbooks/manage-ssl-certs.yml b/xci/playbooks/manage-ssl-certs.yml
new file mode 100644
index 00000000..d0c5c518
--- /dev/null
+++ b/xci/playbooks/manage-ssl-certs.yml
@@ -0,0 +1,32 @@
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2018 SUSE Linux GmbH and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+- name: Install required pip packages for SSL
+ pip:
+ name: pyOpenSSL
+ state: present
+ extra_args: "{{ extra_args | default(omit) }}"
+
+- name: Generate XCI private key
+ openssl_privatekey:
+ path: /etc/ssl/private/xci.key
+ size: 2048
+
+- name: Generate XCI certificate request
+ openssl_csr:
+ privatekey_path: /etc/ssl/private/xci.key
+ path: /etc/ssl/private/xci.csr
+ common_name: "{{ xci_ssl_subject }}"
+
+- name: Generate XCI self signed certificate
+ openssl_certificate:
+ path: /etc/ssl/certs/xci.crt
+ privatekey_path: /etc/ssl/private/xci.key
+ csr_path: /etc/ssl/private/xci.csr
+ provider: selfsigned
+ selfsigned_not_after: 20800101000000Z