summaryrefslogtreecommitdiffstats
path: root/roles/etcd/tasks/ca
diff options
context:
space:
mode:
authorJan Chaloupka <jchaloup@redhat.com>2017-09-20 11:56:19 +0200
committerJan Chaloupka <jchaloup@redhat.com>2017-09-25 21:10:45 +0200
commit18306e3401818cfd9723b6813987308f584c6ea3 (patch)
tree9a359314e88ffb662aa0bf765eacfe235a973623 /roles/etcd/tasks/ca
parent67ff061a940a4b9dce6686b8a00a3eb52aeeb698 (diff)
downloadopenshift-18306e3401818cfd9723b6813987308f584c6ea3.tar.gz
openshift-18306e3401818cfd9723b6813987308f584c6ea3.tar.bz2
openshift-18306e3401818cfd9723b6813987308f584c6ea3.tar.xz
openshift-18306e3401818cfd9723b6813987308f584c6ea3.zip
consolidate etcd_common role
Diffstat (limited to 'roles/etcd/tasks/ca')
-rw-r--r--roles/etcd/tasks/ca/deploy.yml78
1 files changed, 0 insertions, 78 deletions
diff --git a/roles/etcd/tasks/ca/deploy.yml b/roles/etcd/tasks/ca/deploy.yml
deleted file mode 100644
index 3d32290a2..000000000
--- a/roles/etcd/tasks/ca/deploy.yml
+++ /dev/null
@@ -1,78 +0,0 @@
----
-- name: Install openssl
- package:
- name: openssl
- state: present
- when: not etcd_is_atomic | bool
- delegate_to: "{{ etcd_ca_host }}"
- run_once: true
-
-- file:
- path: "{{ item }}"
- state: directory
- mode: 0700
- owner: root
- group: root
- with_items:
- - "{{ etcd_ca_new_certs_dir }}"
- - "{{ etcd_ca_crl_dir }}"
- - "{{ etcd_ca_dir }}/fragments"
- delegate_to: "{{ etcd_ca_host }}"
- run_once: true
-
-- command: cp /etc/pki/tls/openssl.cnf ./
- args:
- chdir: "{{ etcd_ca_dir }}/fragments"
- creates: "{{ etcd_ca_dir }}/fragments/openssl.cnf"
- delegate_to: "{{ etcd_ca_host }}"
- run_once: true
-
-- template:
- dest: "{{ etcd_ca_dir }}/fragments/openssl_append.cnf"
- src: openssl_append.j2
- backup: true
- delegate_to: "{{ etcd_ca_host }}"
- run_once: true
-
-- assemble:
- src: "{{ etcd_ca_dir }}/fragments"
- dest: "{{ etcd_openssl_conf }}"
- delegate_to: "{{ etcd_ca_host }}"
- run_once: true
-
-- name: Check etcd_ca_db exist
- stat: path="{{ etcd_ca_db }}"
- register: etcd_ca_db_check
- changed_when: false
- delegate_to: "{{ etcd_ca_host }}"
- run_once: true
-
-- name: Touch etcd_ca_db file
- file:
- path: "{{ etcd_ca_db }}"
- state: touch
- when: etcd_ca_db_check.stat.isreg is not defined
- delegate_to: "{{ etcd_ca_host }}"
- run_once: true
-
-- copy:
- dest: "{{ etcd_ca_serial }}"
- content: "01"
- force: no
- delegate_to: "{{ etcd_ca_host }}"
- run_once: true
-
-- name: Create etcd CA certificate
- command: >
- openssl req -config {{ etcd_openssl_conf }} -newkey rsa:4096
- -keyout {{ etcd_ca_key }} -new -out {{ etcd_ca_cert }}
- -x509 -extensions {{ etcd_ca_exts_self }} -batch -nodes
- -days {{ etcd_ca_default_days }}
- -subj /CN=etcd-signer@{{ ansible_date_time.epoch }}
- args:
- chdir: "{{ etcd_ca_dir }}"
- creates: "{{ etcd_ca_cert }}"
- environment:
- SAN: 'etcd-signer'
- delegate_to: "{{ etcd_ca_host }}"
- run_once: true