diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2015-10-29 11:14:51 -0400 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2015-10-29 11:14:51 -0400 |
commit | 9bbaa824da5e1a049cdec1a6523c3841d713386c (patch) | |
tree | 93e80f1577ad0f2f5f8931b493c50cd9aa657c77 /roles/openshift_node_certificates | |
parent | 15df494fb781dd1509854eeb366e981930b52c22 (diff) | |
parent | 16d1bce0be2f8c3942489630adcb7030aecadc55 (diff) | |
download | openshift-9bbaa824da5e1a049cdec1a6523c3841d713386c.tar.gz openshift-9bbaa824da5e1a049cdec1a6523c3841d713386c.tar.bz2 openshift-9bbaa824da5e1a049cdec1a6523c3841d713386c.tar.xz openshift-9bbaa824da5e1a049cdec1a6523c3841d713386c.zip |
Merge pull request #763 from openshift/master
Merge master into prod.
Diffstat (limited to 'roles/openshift_node_certificates')
-rw-r--r-- | roles/openshift_node_certificates/README.md | 34 | ||||
-rw-r--r-- | roles/openshift_node_certificates/meta/main.yml | 16 | ||||
-rw-r--r-- | roles/openshift_node_certificates/tasks/main.yml | 35 | ||||
-rw-r--r-- | roles/openshift_node_certificates/vars/main.yml | 7 |
4 files changed, 92 insertions, 0 deletions
diff --git a/roles/openshift_node_certificates/README.md b/roles/openshift_node_certificates/README.md new file mode 100644 index 000000000..6264d253a --- /dev/null +++ b/roles/openshift_node_certificates/README.md @@ -0,0 +1,34 @@ +OpenShift/Atomic Enterprise Node Certificates +============================================= + +TODO + +Requirements +------------ + +TODO + +Role Variables +-------------- + +TODO + +Dependencies +------------ + +TODO + +Example Playbook +---------------- + +TODO + +License +------- + +Apache License Version 2.0 + +Author Information +------------------ + +Jason DeTiberus (jdetiber@redhat.com) diff --git a/roles/openshift_node_certificates/meta/main.yml b/roles/openshift_node_certificates/meta/main.yml new file mode 100644 index 000000000..f3236e850 --- /dev/null +++ b/roles/openshift_node_certificates/meta/main.yml @@ -0,0 +1,16 @@ +--- +galaxy_info: + author: Jason DeTiberus + description: + company: Red Hat, Inc. + license: Apache License, Version 2.0 + min_ansible_version: 1.8 + platforms: + - name: EL + versions: + - 7 + categories: + - cloud + - system +dependencies: +- { role: openshift_facts } diff --git a/roles/openshift_node_certificates/tasks/main.yml b/roles/openshift_node_certificates/tasks/main.yml new file mode 100644 index 000000000..57f71887b --- /dev/null +++ b/roles/openshift_node_certificates/tasks/main.yml @@ -0,0 +1,35 @@ +--- +- name: Create openshift_generated_configs_dir if it doesn't exist + file: + path: "{{ openshift_generated_configs_dir }}" + state: directory + when: nodes_needing_certs | length > 0 + +- name: Generate the node client config + command: > + {{ openshift.common.admin_binary }} create-api-client-config + --certificate-authority={{ openshift_master_ca_cert }} + --client-dir={{ openshift_generated_configs_dir }}/node-{{ item.openshift.common.hostname }} + --groups=system:nodes + --master={{ openshift.master.api_url }} + --signer-cert={{ openshift_master_ca_cert }} + --signer-key={{ openshift_master_ca_key }} + --signer-serial={{ openshift_master_ca_serial }} + --user=system:node:{{ item.openshift.common.hostname }} + args: + chdir: "{{ openshift_generated_configs_dir }}" + creates: "{{ openshift_generated_configs_dir }}/node-{{ item.openshift.common.hostname }}" + with_items: nodes_needing_certs + +- name: Generate the node server certificate + command: > + {{ openshift.common.admin_binary }} create-server-cert + --cert=server.crt --key=server.key --overwrite=true + --hostnames={{ item.openshift.common.all_hostnames |join(",") }} + --signer-cert={{ openshift_master_ca_cert }} + --signer-key={{ openshift_master_ca_key }} + --signer-serial={{ openshift_master_ca_serial }} + args: + chdir: "{{ openshift_generated_configs_dir }}/node-{{ item.openshift.common.hostname }}" + creates: "{{ openshift_generated_configs_dir }}/node-{{ item.openshift.common.hostname }}/server.crt" + with_items: nodes_needing_certs diff --git a/roles/openshift_node_certificates/vars/main.yml b/roles/openshift_node_certificates/vars/main.yml new file mode 100644 index 000000000..61fbb1e51 --- /dev/null +++ b/roles/openshift_node_certificates/vars/main.yml @@ -0,0 +1,7 @@ +--- +openshift_node_config_dir: "{{ openshift.common.config_base }}/node" +openshift_master_config_dir: "{{ openshift.common.config_base }}/master" +openshift_generated_configs_dir: "{{ openshift.common.config_base }}/generated-configs" +openshift_master_ca_cert: "{{ openshift_master_config_dir }}/ca.crt" +openshift_master_ca_key: "{{ openshift_master_config_dir }}/ca.key" +openshift_master_ca_serial: "{{ openshift_master_config_dir }}/ca.serial.txt" |