diff options
| author | Brenton Leanhardt <bleanhar@redhat.com> | 2015-09-10 15:56:15 -0400 | 
|---|---|---|
| committer | Brenton Leanhardt <bleanhar@redhat.com> | 2015-09-10 15:56:15 -0400 | 
| commit | a5011b9ad04c552a5fcda77d08cdb5fa77d40f01 (patch) | |
| tree | 3e2fceb65a5061512f0313dda029474f2c2878bb /roles | |
| parent | 40c6cccf492c787421b4438392804fe188fbc58b (diff) | |
| parent | 12b56e720a8221208fbc1c5dd8a7e5732aa4f04e (diff) | |
| download | openshift-a5011b9ad04c552a5fcda77d08cdb5fa77d40f01.tar.gz openshift-a5011b9ad04c552a5fcda77d08cdb5fa77d40f01.tar.bz2 openshift-a5011b9ad04c552a5fcda77d08cdb5fa77d40f01.tar.xz openshift-a5011b9ad04c552a5fcda77d08cdb5fa77d40f01.zip | |
Merge pull request #570 from sdodson/openshift_data_dir
Move openshift_data_dir to openshift.common.data_dir fact based on deployment_type
Diffstat (limited to 'roles')
| -rw-r--r-- | roles/openshift_common/vars/main.yml | 2 | ||||
| -rwxr-xr-x | roles/openshift_facts/library/openshift_facts.py | 9 | ||||
| -rw-r--r-- | roles/openshift_master/templates/master.yaml.v1.j2 | 2 | ||||
| -rw-r--r-- | roles/openshift_node/templates/node.yaml.v1.j2 | 2 | 
4 files changed, 11 insertions, 4 deletions
| diff --git a/roles/openshift_common/vars/main.yml b/roles/openshift_common/vars/main.yml index 817fe0a5f..50816d319 100644 --- a/roles/openshift_common/vars/main.yml +++ b/roles/openshift_common/vars/main.yml @@ -5,5 +5,3 @@  # chains with the public zone (or the zone associated with the correct  # interfaces)  os_firewall_use_firewalld: False - -openshift_data_dir: /var/lib/origin diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index 679c3273a..60d1226d4 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -454,6 +454,8 @@ def set_deployment_facts_if_unset(facts):              dict: the facts dict updated with the generated deployment_type              facts      """ +    # Perhaps re-factor this as a map? +    # pylint: disable=too-many-branches      if 'common' in facts:          deployment_type = facts['common']['deployment_type']          if 'service_type' not in facts['common']: @@ -470,6 +472,13 @@ def set_deployment_facts_if_unset(facts):              elif deployment_type == 'origin':                  config_base = '/etc/openshift'              facts['common']['config_base'] = config_base +        if 'data_dir' not in facts['common']: +            data_dir = '/var/lib/origin' +            if deployment_type in ['enterprise', 'online']: +                data_dir = '/var/lib/openshift' +            elif deployment_type == 'origin': +                data_dir = '/var/lib/openshift' +            facts['common']['data_dir'] = data_dir      for role in ('master', 'node'):          if role in facts: diff --git a/roles/openshift_master/templates/master.yaml.v1.j2 b/roles/openshift_master/templates/master.yaml.v1.j2 index 7aa4ce9b6..500690523 100644 --- a/roles/openshift_master/templates/master.yaml.v1.j2 +++ b/roles/openshift_master/templates/master.yaml.v1.j2 @@ -46,7 +46,7 @@ etcdConfig:      certFile: etcd.server.crt      clientCA: ca.crt      keyFile: etcd.server.key -  storageDirectory: {{ openshift_data_dir }}/openshift.local.etcd +  storageDirectory: {{ openshift.common.data_dir }}/openshift.local.etcd  {% endif %}  etcdStorageConfig:    kubernetesStoragePrefix: kubernetes.io diff --git a/roles/openshift_node/templates/node.yaml.v1.j2 b/roles/openshift_node/templates/node.yaml.v1.j2 index 0f708fb55..07d80f99b 100644 --- a/roles/openshift_node/templates/node.yaml.v1.j2 +++ b/roles/openshift_node/templates/node.yaml.v1.j2 @@ -25,5 +25,5 @@ servingInfo:    certFile: server.crt    clientCA: ca.crt    keyFile: server.key -volumeDirectory: {{ openshift_data_dir }}/openshift.local.volumes +volumeDirectory: {{ openshift.common.data_dir }}/openshift.local.volumes  {% include 'partials/kubeletArguments.j2' %} | 
