diff options
author | Scott Dodson <sdodson@redhat.com> | 2015-04-30 17:04:15 -0400 |
---|---|---|
committer | Jason DeTiberus <jdetiber@redhat.com> | 2015-06-10 11:29:23 -0400 |
commit | b57392ddd54bbff225ba83dd5a5bf40ea99344a4 (patch) | |
tree | 28700b81ad52e4535604a4646baeea1c54b880c9 /roles/openshift_master/tasks | |
parent | fe458e2c29bffdab7708b67539a36a08506560da (diff) | |
download | openshift-b57392ddd54bbff225ba83dd5a5bf40ea99344a4.tar.gz openshift-b57392ddd54bbff225ba83dd5a5bf40ea99344a4.tar.bz2 openshift-b57392ddd54bbff225ba83dd5a5bf40ea99344a4.tar.xz openshift-b57392ddd54bbff225ba83dd5a5bf40ea99344a4.zip |
Accomodate upstream configuration change
- Master config and certificates are now in /etc/openshift/master
- Node config is now in /etc/openshift/node
- Several certificates have been renamed to accomodate a flattening of
structure to accomodate secret storage
- Add openshift_data_dir to ensure etcd and volumes are stored in
/var/lib/openshift
- Add openshift_generated_configs_dir
Diffstat (limited to 'roles/openshift_master/tasks')
-rw-r--r-- | roles/openshift_master/tasks/main.yml | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml index ac96e2b48..f243825b2 100644 --- a/roles/openshift_master/tasks/main.yml +++ b/roles/openshift_master/tasks/main.yml @@ -36,14 +36,9 @@ command: systemctl daemon-reload when: install_result | changed -- name: Create certificate parent directory if it doesn't exist - file: - path: "{{ openshift_cert_parent_dir }}" - state: directory - - name: Create config parent directory if it doesn't exist file: - path: "{{ openshift_master_config | dirname }}" + path: "{{ openshift_master_config_dir }}" state: directory # TODO: should probably use a template lookup for this @@ -59,25 +54,32 @@ oreg_url: "docker-registry.ops.rhcloud.com/openshift3_beta/ose-${component}:${version}" when: openshift.common.deployment_type == 'online' and oreg_url is not defined +# TODO: Need to get a flag added for volumes path, i think it'll get put in - name: Create master config command: > - /usr/bin/openshift start master --write-config - --config={{ openshift_master_config }} + /usr/bin/openshift start master + --write-config={{ openshift_master_config_dir }} --portal-net={{ openshift.master.portal_net }} + --etcd-dir={{ openshift_data_dir }}/openshift.local.etcd --master={{ openshift.master.api_url }} --public-master={{ openshift.master.public_api_url }} --listen={{ 'https' if openshift.master.api_use_ssl else 'http' }}://0.0.0.0:{{ openshift.master.api_port }} {{ ('--images=' ~ oreg_url) if (oreg_url | default('', true) != '') else '' }} {{ ('--nodes=' ~ openshift_node_ips | join(',')) if (openshift_node_ips | default('', true) != '') else '' }} args: - chdir: "{{ openshift_cert_parent_dir }}" - creates: "{{ openshift_master_config }}" + chdir: "{{ openshift_master_config_dir }}" + creates: "{{ openshift_master_config_file }}" - name: Configure OpenShift settings lineinfile: dest: /etc/sysconfig/openshift-master - regexp: '^OPTIONS=' - line: "OPTIONS=\"--config={{ openshift_master_config }} --loglevel={{ openshift.master.debug_level }}\"" + regexp: "{{ item.regex }}" + line: "{{ item.line }}" + with_items: + - regex: '^OPTIONS=' + line: "OPTIONS=--loglevel={{ openshift.master.debug_level }}" + - regex: '^CONFIG_FILE=' + line: "CONFIG_FILE={{ openshift_master_config_file}}" notify: - restart openshift-master @@ -98,7 +100,7 @@ # TODO: Update this file if the contents of the source file are not present in # the dest file, will need to make sure to ignore things that could be added - name: Create the OpenShift client config(s) - command: cp {{ openshift_cert_dir }}/openshift-client/.kubeconfig ~{{ item }}/.config/openshift/.config + command: cp {{ openshift_master_config_dir }}/openshift-client.kubeconfig ~{{ item }}/.config/openshift/.config args: creates: ~{{ item }}/.config/openshift/.config with_items: |