فهرست منبع

Merge pull request #5208 from mgugino-upstream-stage/remove-openshift_common

Merged by openshift-bot
OpenShift Bot 7 سال پیش
والد
کامیت
6da235f41a
69فایلهای تغییر یافته به همراه199 افزوده شده و 399 حذف شده
  1. 1 1
      DEPLOYMENT_TYPES.md
  2. 1 12
      filter_plugins/openshift_node.py
  3. 3 4
      inventory/byo/hosts.origin.example
  4. 2 4
      inventory/byo/hosts.ose.example
  5. 0 2
      playbooks/adhoc/uninstall.yml
  6. 0 2
      playbooks/byo/openshift-cluster/config.yml
  7. 0 3
      playbooks/byo/openshift-cluster/openshift-logging.yml
  8. 0 3
      playbooks/byo/openshift-cluster/service-catalog.yml
  9. 0 3
      playbooks/byo/openshift-master/scaleup.yml
  10. 8 0
      playbooks/common/openshift-cluster/config.yml
  11. 0 6
      playbooks/common/openshift-cluster/enable_dnsmasq.yml
  12. 0 4
      playbooks/common/openshift-cluster/initialize_facts.yml
  13. 0 1
      playbooks/common/openshift-cluster/openshift_hosted.yml
  14. 47 0
      playbooks/common/openshift-cluster/sanity_checks.yml
  15. 4 0
      playbooks/common/openshift-cluster/std_include.yml
  16. 1 1
      playbooks/common/openshift-cluster/tasks/set_etcd_launch_facts.yml
  17. 1 1
      playbooks/common/openshift-cluster/tasks/set_master_launch_facts.yml
  18. 1 1
      playbooks/common/openshift-cluster/tasks/set_node_launch_facts.yml
  19. 0 1
      playbooks/common/openshift-cluster/upgrades/docker/docker_upgrade.yml
  20. 0 1
      playbooks/common/openshift-cluster/upgrades/init.yml
  21. 3 3
      playbooks/common/openshift-master/additional_config.yml
  22. 2 2
      playbooks/common/openshift-master/config.yml
  23. 4 4
      playbooks/common/openshift-node/config.yml
  24. 0 1
      roles/openshift_cfme/meta/main.yml
  25. 0 1
      roles/openshift_cli/meta/main.yml
  26. 0 45
      roles/openshift_common/README.md
  27. 0 3
      roles/openshift_common/defaults/main.yml
  28. 0 15
      roles/openshift_common/meta/main.yml
  29. 0 78
      roles/openshift_common/tasks/main.yml
  30. 1 2
      roles/openshift_examples/meta/main.yml
  31. 3 117
      roles/openshift_facts/library/openshift_facts.py
  32. 0 1
      roles/openshift_hosted/README.md
  33. 6 0
      roles/openshift_hosted/defaults/main.yml
  34. 0 1
      roles/openshift_hosted_logging/meta/main.yaml
  35. 1 2
      roles/openshift_hosted_templates/meta/main.yml
  36. 7 1
      roles/openshift_loadbalancer/defaults/main.yml
  37. 0 9
      roles/openshift_master/README.md
  38. 20 1
      roles/openshift_master/defaults/main.yml
  39. 1 1
      roles/openshift_master/meta/main.yml
  40. 3 3
      roles/openshift_master/tasks/main.yml
  41. 7 0
      roles/openshift_master/tasks/systemd_units.yml
  42. 2 2
      roles/openshift_master/templates/docker-cluster/atomic-openshift-master-api.service.j2
  43. 2 2
      roles/openshift_master/templates/docker-cluster/atomic-openshift-master-controllers.service.j2
  44. 3 3
      roles/openshift_master/templates/master.yaml.v1.j2
  45. 1 1
      roles/openshift_master/templates/native-cluster/atomic-openshift-master-api.service.j2
  46. 1 1
      roles/openshift_master/templates/native-cluster/atomic-openshift-master-controllers.service.j2
  47. 0 10
      roles/openshift_node/README.md
  48. 25 3
      roles/openshift_node/defaults/main.yml
  49. 1 1
      roles/openshift_node/handlers/main.yml
  50. 0 2
      roles/openshift_node/meta/main.yml
  51. 1 1
      roles/openshift_node/tasks/config.yml
  52. 1 1
      roles/openshift_node/tasks/install.yml
  53. 1 1
      roles/openshift_node/tasks/main.yml
  54. 2 2
      roles/openshift_node/tasks/systemd_units.yml
  55. 5 5
      roles/openshift_node/templates/node.yaml.v1.j2
  56. 2 2
      roles/openshift_node/templates/openshift.docker.node.service
  57. 0 1
      roles/openshift_node_dnsmasq/meta/main.yml
  58. 1 3
      roles/openshift_node_upgrade/README.md
  59. 5 0
      roles/openshift_node_upgrade/defaults/main.yml
  60. 1 1
      roles/openshift_node_upgrade/handlers/main.yml
  61. 0 1
      roles/openshift_node_upgrade/meta/main.yml
  62. 2 2
      roles/openshift_node_upgrade/tasks/main.yml
  63. 3 3
      roles/openshift_node_upgrade/tasks/systemd_units.yml
  64. 2 2
      roles/openshift_node_upgrade/templates/openshift.docker.node.service
  65. 0 7
      roles/openshift_persistent_volumes/README.md
  66. 0 1
      roles/openshift_persistent_volumes/meta/main.yml
  67. 4 0
      roles/openshift_service_catalog/defaults/main.yml
  68. 1 1
      roles/openshift_service_catalog/tasks/install.yml
  69. 6 0
      roles/openshift_version/tasks/main.yml

+ 1 - 1
DEPLOYMENT_TYPES.md

@@ -12,6 +12,6 @@ The table below outlines the defaults per `openshift_deployment_type`:
 |-----------------------------------------------------------------|------------------------------------------|----------------------------------------|
 | **openshift.common.service_type** (also used for package names) | origin                                   | atomic-openshift                       |
 | **openshift.common.config_base**                                | /etc/origin                              | /etc/origin                            |
-| **openshift.common.data_dir**                                   | /var/lib/origin                          | /var/lib/origin                        |
+| **openshift_data_dir**                                          | /var/lib/origin                          | /var/lib/origin                        |
 | **openshift.master.registry_url openshift.node.registry_url**   | openshift/origin-${component}:${version} | openshift3/ose-${component}:${version} |
 | **Image Streams**                                               | centos                                   | rhel                                   |

+ 1 - 12
filter_plugins/openshift_node.py

@@ -25,18 +25,7 @@ class FilterModule(object):
         # We always use what they've specified if they've specified a value
         if openshift_dns_ip is not None:
             return openshift_dns_ip
-
-        if bool(hostvars['openshift']['common']['use_dnsmasq']):
-            return hostvars['ansible_default_ipv4']['address']
-        elif bool(hostvars['openshift']['common']['version_gte_3_1_or_1_1']):
-            if 'openshift_master_cluster_vip' in hostvars:
-                return hostvars['openshift_master_cluster_vip']
-        else:
-            if 'openshift_master_cluster_vip' in hostvars:
-                return hostvars['openshift_master_cluster_vip']
-            elif 'openshift_node_first_master_ip' in hostvars:
-                return hostvars['openshift_node_first_master_ip']
-        return None
+        return hostvars['ansible_default_ipv4']['address']
 
     def filters(self):
         ''' returns a mapping of filters to methods '''

+ 3 - 4
inventory/byo/hosts.origin.example

@@ -719,11 +719,10 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true',
 # Setting this variable to true will override that check.
 #openshift_override_hostname_check=true
 
-# Configure dnsmasq for cluster dns, switch the host's local resolver to use dnsmasq
-# and configure node's dnsIP to point at the node's local dnsmasq instance. Defaults
-# to True for Origin 1.2 and OSE 3.2. False for 1.1 / 3.1 installs, this cannot
-# be used with 1.0 and 3.0.
+# openshift_use_dnsmasq is deprecated.  This must be true, or installs will fail
+# in versions >= 3.6
 #openshift_use_dnsmasq=False
+
 # Define an additional dnsmasq.conf file to deploy to /etc/dnsmasq.d/openshift-ansible.conf
 # This is useful for POC environments where DNS may not actually be available yet or to set
 # options like 'strict-order' to alter dnsmasq configuration.

+ 2 - 4
inventory/byo/hosts.ose.example

@@ -727,10 +727,8 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true',
 # Setting this variable to true will override that check.
 #openshift_override_hostname_check=true
 
-# Configure dnsmasq for cluster dns, switch the host's local resolver to use dnsmasq
-# and configure node's dnsIP to point at the node's local dnsmasq instance. Defaults
-# to True for Origin 1.2 and OSE 3.2. False for 1.1 / 3.1 installs, this cannot
-# be used with 1.0 and 3.0.
+# openshift_use_dnsmasq is deprecated.  This must be true, or installs will fail
+# in versions >= 3.6
 #openshift_use_dnsmasq=False
 # Define an additional dnsmasq.conf file to deploy to /etc/dnsmasq.d/openshift-ansible.conf
 # This is useful for POC environments where DNS may not actually be available yet or to set

+ 0 - 2
playbooks/adhoc/uninstall.yml

@@ -35,11 +35,9 @@
     - /etc/dnsmasq.d/origin-upstream-dns.conf
     - /etc/dnsmasq.d/openshift-ansible.conf
     - /etc/NetworkManager/dispatcher.d/99-origin-dns.sh
-    when: openshift_use_dnsmasq | default(true) | bool
   - service:
       name: NetworkManager
       state: restarted
-    when: openshift_use_dnsmasq | default(true) | bool
   - name: Stop services
     service: name={{ item }} state=stopped
     with_items:

+ 0 - 2
playbooks/byo/openshift-cluster/config.yml

@@ -9,6 +9,4 @@
 
 - include: ../../common/openshift-cluster/config.yml
   vars:
-    openshift_cluster_id: "{{ cluster_id | default('default') }}"
-    openshift_debug_level: "{{ debug_level | default(2) }}"
     openshift_deployment_subtype: "{{ deployment_subtype | default(none) }}"

+ 0 - 3
playbooks/byo/openshift-cluster/openshift-logging.yml

@@ -13,6 +13,3 @@
   - always
 
 - include: ../../common/openshift-cluster/openshift_logging.yml
-  vars:
-    openshift_cluster_id: "{{ cluster_id | default('default') }}"
-    openshift_debug_level: "{{ debug_level | default(2) }}"

+ 0 - 3
playbooks/byo/openshift-cluster/service-catalog.yml

@@ -13,6 +13,3 @@
   - always
 
 - include: ../../common/openshift-cluster/service_catalog.yml
-  vars:
-    openshift_cluster_id: "{{ cluster_id | default('default') }}"
-    openshift_debug_level: "{{ debug_level | default(2) }}"

+ 0 - 3
playbooks/byo/openshift-master/scaleup.yml

@@ -18,6 +18,3 @@
 - include: ../../common/openshift-cluster/std_include.yml
 
 - include: ../../common/openshift-master/scaleup.yml
-  vars:
-    openshift_cluster_id: "{{ cluster_id | default('default') }}"
-    openshift_debug_level: "{{ debug_level | default(2) }}"

+ 8 - 0
playbooks/common/openshift-cluster/config.yml

@@ -22,6 +22,14 @@
   tags:
   - always
 
+- name: Set hostname
+  hosts: oo_masters_to_config:oo_nodes_to_config
+  tasks:
+  - name: Set hostname
+    hostname:
+      name: "{{ openshift.common.hostname }}"
+    when: openshift_set_hostname | default(True) | bool
+
 - include: ../openshift-etcd/config.yml
 
 - include: ../openshift-nfs/config.yml

+ 0 - 6
playbooks/common/openshift-cluster/enable_dnsmasq.yml

@@ -27,9 +27,6 @@
       role: "{{ item.role }}"
       local_facts: "{{ item.local_facts }}"
     with_items:
-    - role: common
-      local_facts:
-        use_dnsmasq: True
     - role: master
       local_facts:
         dns_port: '8053'
@@ -50,9 +47,6 @@
       role: "{{ item.role }}"
       local_facts: "{{ item.local_facts }}"
     with_items:
-    - role: common
-      local_facts:
-        use_dnsmasq: True
     - role: node
       local_facts:
         dns_ip: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}"

+ 0 - 4
playbooks/common/openshift-cluster/initialize_facts.yml

@@ -126,11 +126,9 @@
     openshift_facts:
       role: common
       local_facts:
-        debug_level: "{{ openshift_debug_level | default(2) }}"
         deployment_type: "{{ openshift_deployment_type }}"
         deployment_subtype: "{{ openshift_deployment_subtype | default(None) }}"
         cli_image: "{{ osm_image | default(None) }}"
-        cluster_id: "{{ openshift_cluster_id | default('default') }}"
         hostname: "{{ openshift_hostname | default(None) }}"
         ip: "{{ openshift_ip | default(None) }}"
         is_containerized: "{{ l_is_containerized | default(None) }}"
@@ -148,8 +146,6 @@
         no_proxy: "{{ openshift_no_proxy | default(None) }}"
         generate_no_proxy_hosts: "{{ openshift_generate_no_proxy_hosts | default(True) }}"
         no_proxy_internal_hostnames: "{{ openshift_no_proxy_internal_hostnames | default(None) }}"
-        sdn_network_plugin_name: "{{ os_sdn_network_plugin_name | default(None) }}"
-        use_openshift_sdn: "{{ openshift_use_openshift_sdn | default(None) }}"
 
   - name: initialize_facts set_fact repoquery command
     set_fact:

+ 0 - 1
playbooks/common/openshift-cluster/openshift_hosted.yml

@@ -29,7 +29,6 @@
   - role: openshift_default_storage_class
     when: openshift_cloudprovider_kind is defined and (openshift_cloudprovider_kind == 'aws' or openshift_cloudprovider_kind == 'gce')
   - role: openshift_hosted
-    r_openshift_hosted_use_calico: "{{ openshift.common.use_calico | default(false) | bool }}"
   - role: openshift_metrics
     when: openshift_hosted_metrics_deploy | default(false) | bool
   - role: openshift_logging

+ 47 - 0
playbooks/common/openshift-cluster/sanity_checks.yml

@@ -0,0 +1,47 @@
+---
+- name: Verify Requirements
+  hosts: oo_all_hosts
+  tasks:
+  - fail:
+      msg: Flannel can not be used with openshift sdn, set openshift_use_openshift_sdn=false if you want to use flannel
+    when: openshift_use_openshift_sdn | default(true) | bool and openshift_use_flannel | default(false) | bool
+
+  - fail:
+      msg: Nuage sdn can not be used with openshift sdn, set openshift_use_openshift_sdn=false if you want to use nuage
+    when: openshift_use_openshift_sdn | default(true) | bool and openshift_use_nuage | default(false) | bool
+
+  - fail:
+      msg: Nuage sdn can not be used with flannel
+    when: openshift_use_flannel | default(false) | bool and openshift_use_nuage | default(false) | bool
+
+  - fail:
+      msg: Contiv can not be used with openshift sdn, set openshift_use_openshift_sdn=false if you want to use contiv
+    when: openshift_use_openshift_sdn | default(true) | bool and openshift_use_contiv | default(false) | bool
+
+  - fail:
+      msg: Contiv can not be used with flannel
+    when: openshift_use_flannel | default(false) | bool and openshift_use_contiv | default(false) | bool
+
+  - fail:
+      msg: Contiv can not be used with nuage
+    when: openshift_use_nuage | default(false) | bool and openshift_use_contiv | default(false) | bool
+
+  - fail:
+      msg: Calico can not be used with openshift sdn, set openshift_use_openshift_sdn=false if you want to use Calico
+    when: openshift_use_openshift_sdn | default(true) | bool and openshift_use_calico | default(false) | bool
+
+  - fail:
+      msg: The Calico playbook does not yet integrate with the Flannel playbook in Openshift. Set either openshift_use_calico or openshift_use_flannel, but not both.
+    when: openshift_use_calico | default(false) | bool and openshift_use_flannel | default(false) | bool
+
+  - fail:
+      msg: Calico can not be used with Nuage in Openshift. Set either openshift_use_calico or openshift_use_nuage, but not both
+    when: openshift_use_calico | default(false) | bool and openshift_use_nuage | default(false) | bool
+
+  - fail:
+      msg: Calico can not be used with Contiv in Openshift. Set either openshift_use_calico or openshift_use_contiv, but not both
+    when: openshift_use_calico | default(false) | bool and openshift_use_contiv | default(false) | bool
+
+  - fail:
+      msg: openshift_hostname must be 63 characters or less
+    when: openshift_hostname is defined and openshift_hostname | length > 63

+ 4 - 0
playbooks/common/openshift-cluster/std_include.yml

@@ -7,6 +7,10 @@
   tags:
   - always
 
+- include: sanity_checks.yml
+  tags:
+  - always
+
 - include: validate_hostnames.yml
   tags:
   - node

+ 1 - 1
playbooks/common/openshift-cluster/tasks/set_etcd_launch_facts.yml

@@ -3,7 +3,7 @@
 
 - name: Generate etcd instance names(s)
   set_fact:
-    scratch_name: "{{ cluster_id }}-{{ k8s_type }}-{{ '%05x' | format(1048576 | random) }}"
+    scratch_name: "{{ openshift_cluster_id | default('default') }}-{{ k8s_type }}-{{ '%05x' | format(1048576 | random) }}"
   register: etcd_names_output
   with_sequence: count={{ num_etcd }}
 

+ 1 - 1
playbooks/common/openshift-cluster/tasks/set_master_launch_facts.yml

@@ -3,7 +3,7 @@
 
 - name: Generate master instance names(s)
   set_fact:
-    scratch_name: "{{ cluster_id }}-{{ k8s_type }}-{{ '%05x' | format(1048576 | random) }}"
+    scratch_name: "{{ openshift_cluster_id | default('default') }}-{{ k8s_type }}-{{ '%05x' | format(1048576 | random) }}"
   register: master_names_output
   with_sequence: count={{ num_masters }}
 

+ 1 - 1
playbooks/common/openshift-cluster/tasks/set_node_launch_facts.yml

@@ -5,7 +5,7 @@
 
 - name: Generate node instance names(s)
   set_fact:
-    scratch_name: "{{ cluster_id }}-{{ k8s_type }}-{{ sub_host_type }}-{{ '%05x' | format(1048576 | random) }}"
+    scratch_name: "{{ openshift_cluster_id | default('default') }}-{{ k8s_type }}-{{ sub_host_type }}-{{ '%05x' | format(1048576 | random) }}"
   register: node_names_output
   with_sequence: count={{ number_nodes }}
 

+ 0 - 1
playbooks/common/openshift-cluster/upgrades/docker/docker_upgrade.yml

@@ -4,7 +4,6 @@
     # Do not allow adding hosts during upgrade.
     g_new_master_hosts: []
     g_new_node_hosts: []
-    openshift_cluster_id: "{{ cluster_id | default('default') }}"
 
 - include: ../initialize_nodes_to_upgrade.yml
 

+ 0 - 1
playbooks/common/openshift-cluster/upgrades/init.yml

@@ -4,7 +4,6 @@
     # Do not allow adding hosts during upgrade.
     g_new_master_hosts: []
     g_new_node_hosts: []
-    openshift_cluster_id: "{{ cluster_id | default('default') }}"
 
 - include: ../initialize_oo_option_facts.yml
 

+ 3 - 3
playbooks/common/openshift-master/additional_config.yml

@@ -11,13 +11,13 @@
     when: openshift_master_ha | bool and openshift.master.cluster_method == "pacemaker"
   - role: openshift_examples
     registry_url: "{{ openshift.master.registry_url }}"
-    when: openshift.common.install_examples | bool
+    when: openshift_install_examples | default(True)
   - role: openshift_hosted_templates
     registry_url: "{{ openshift.master.registry_url }}"
   - role: openshift_manageiq
-    when: openshift.common.use_manageiq | bool
+    when: openshift_use_manageiq | default(false) | bool
   - role: cockpit
     when: not openshift.common.is_atomic and ( deployment_type in ['atomic-enterprise','openshift-enterprise'] ) and
       (osm_use_cockpit | bool or osm_use_cockpit is undefined ) and ( openshift.common.deployment_subtype != 'registry' )
   - role: flannel_register
-    when: openshift.common.use_flannel | bool
+    when: openshift_use_flannel | default(false) | bool

+ 2 - 2
playbooks/common/openshift-master/config.yml

@@ -208,9 +208,9 @@
     openshift_master_default_registry_value_api: "{{ hostvars[groups.oo_first_master.0].l_default_registry_value_api }}"
     openshift_master_default_registry_value_controllers: "{{ hostvars[groups.oo_first_master.0].l_default_registry_value_controllers }}"
   - role: nuage_master
-    when: openshift.common.use_nuage | bool
+    when: openshift_use_nuage | default(false) | bool
   - role: calico_master
-    when: openshift.common.use_calico | bool
+    when: openshift_use_calico | default(false) | bool
 
   post_tasks:
   - name: Create group for deployment type

+ 4 - 4
playbooks/common/openshift-node/config.yml

@@ -71,14 +71,14 @@
     etcd_ca_host: "{{ groups.oo_etcd_to_config.0 }}"
     etcd_cert_subdir: "openshift-node-{{ openshift.common.hostname }}"
     etcd_cert_config_dir: "{{ openshift.common.config_base }}/node"
-    when: openshift.common.use_flannel | bool
+    when: openshift_use_flannel | default(false) | bool
   - role: calico
-    when: openshift.common.use_calico | bool
+    when: openshift_use_calico | default(false) | bool
   - role: nuage_node
-    when: openshift.common.use_nuage | bool
+    when: openshift_use_nuage | default(false) | bool
   - role: contiv
     contiv_role: netplugin
-    when: openshift.common.use_contiv | bool
+    when: openshift_use_contiv | default(false) | bool
   - role: nickhammond.logrotate
   - role: openshift_manage_node
     openshift_master_host: "{{ groups.oo_first_master.0 }}"

+ 0 - 1
roles/openshift_cfme/meta/main.yml

@@ -16,5 +16,4 @@ galaxy_info:
 dependencies:
 - role: lib_openshift
 - role: lib_utils
-- role: openshift_common
 - role: openshift_master_facts

+ 0 - 1
roles/openshift_cli/meta/main.yml

@@ -14,5 +14,4 @@ galaxy_info:
 dependencies:
 - role: openshift_docker
   when: not skip_docker_role | default(False) | bool
-- role: openshift_common
 - role: openshift_facts

+ 0 - 45
roles/openshift_common/README.md

@@ -1,45 +0,0 @@
-OpenShift/Atomic Enterprise Common
-===================================
-
-OpenShift/Atomic Enterprise common installation and configuration tasks.
-
-Requirements
-------------
-
-A RHEL 7.1 host pre-configured with access to the rhel-7-server-rpms,
-rhel-7-server-extra-rpms, and rhel-7-server-ose-3.0-rpms repos.
-
-Role Variables
---------------
-
-| Name                      | Default value     |                                             |
-|---------------------------|-------------------|---------------------------------------------|
-| openshift_cluster_id      | default           | Cluster name if multiple OpenShift clusters |
-| openshift_debug_level     | 2                 | Global openshift debug log verbosity        |
-| openshift_hostname        | UNDEF             | Internal hostname to use for this host (this value will set the hostname on the system) |
-| openshift_ip              | UNDEF             | Internal IP address to use for this host    |
-| openshift_public_hostname | UNDEF             | Public hostname to use for this host        |
-| openshift_public_ip       | UNDEF             | Public IP address to use for this host      |
-| openshift_portal_net      | UNDEF             | Service IP CIDR |
-
-Dependencies
-------------
-
-os_firewall
-openshift_facts
-openshift_repos
-
-Example Playbook
-----------------
-
-TODO
-
-License
--------
-
-Apache License, Version 2.0
-
-Author Information
-------------------
-
-Jason DeTiberus (jdetiber@redhat.com)

+ 0 - 3
roles/openshift_common/defaults/main.yml

@@ -1,3 +0,0 @@
----
-openshift_cluster_id: 'default'
-openshift_debug_level: 2

+ 0 - 15
roles/openshift_common/meta/main.yml

@@ -1,15 +0,0 @@
----
-galaxy_info:
-  author: Jason DeTiberus
-  description: OpenShift Common
-  company: Red Hat, Inc.
-  license: Apache License, Version 2.0
-  min_ansible_version: 1.7
-  platforms:
-  - name: EL
-    versions:
-    - 7
-  categories:
-  - cloud
-dependencies:
-- role: openshift_facts

+ 0 - 78
roles/openshift_common/tasks/main.yml

@@ -1,78 +0,0 @@
----
-- fail:
-    msg: Flannel can not be used with openshift sdn, set openshift_use_openshift_sdn=false if you want to use flannel
-  when: openshift_use_openshift_sdn | default(true) | bool and openshift_use_flannel | default(false) | bool
-
-- fail:
-    msg: Nuage sdn can not be used with openshift sdn, set openshift_use_openshift_sdn=false if you want to use nuage
-  when: openshift_use_openshift_sdn | default(true) | bool and openshift_use_nuage | default(false) | bool
-
-- fail:
-    msg: Nuage sdn can not be used with flannel
-  when: openshift_use_flannel | default(false) | bool and openshift_use_nuage | default(false) | bool
-
-- fail:
-    msg: Contiv can not be used with openshift sdn, set openshift_use_openshift_sdn=false if you want to use contiv
-  when: openshift_use_openshift_sdn | default(true) | bool and openshift_use_contiv | default(false) | bool
-
-- fail:
-    msg: Contiv can not be used with flannel
-  when: openshift_use_flannel | default(false) | bool and openshift_use_contiv | default(false) | bool
-
-- fail:
-    msg: Contiv can not be used with nuage
-  when: openshift_use_nuage | default(false) | bool and openshift_use_contiv | default(false) | bool
-
-- fail:
-    msg: Calico can not be used with openshift sdn, set openshift_use_openshift_sdn=false if you want to use Calico
-  when: openshift_use_openshift_sdn | default(true) | bool and openshift_use_calico | default(false) | bool
-
-- fail:
-    msg: The Calico playbook does not yet integrate with the Flannel playbook in Openshift. Set either openshift_use_calico or openshift_use_flannel, but not both.
-  when: openshift_use_calico | default(false) | bool and openshift_use_flannel | default(false) | bool
-
-- fail:
-    msg: Calico can not be used with Nuage in Openshift. Set either openshift_use_calico or openshift_use_nuage, but not both
-  when: openshift_use_calico | default(false) | bool and openshift_use_nuage | default(false) | bool
-
-- fail:
-    msg: Calico can not be used with Contiv in Openshift. Set either openshift_use_calico or openshift_use_contiv, but not both
-  when: openshift_use_calico | default(false) | bool and openshift_use_contiv | default(false) | bool
-
-- fail:
-    msg: openshift_hostname must be 63 characters or less
-  when: openshift_hostname is defined and openshift_hostname | length > 63
-
-- name: Set common Cluster facts
-  openshift_facts:
-    role: common
-    local_facts:
-      install_examples: "{{ openshift_install_examples | default(True) }}"
-      use_openshift_sdn: "{{ openshift_use_openshift_sdn | default(None) }}"
-      sdn_network_plugin_name: "{{ os_sdn_network_plugin_name | default(None) }}"
-      use_flannel: "{{ openshift_use_flannel | default(None) }}"
-      use_calico: "{{openshift_use_calico | default(None) }}"
-      use_nuage: "{{ openshift_use_nuage | default(None) }}"
-      use_contiv: "{{ openshift_use_contiv | default(None) }}"
-      use_manageiq: "{{ openshift_use_manageiq | default(None) }}"
-      data_dir: "{{ openshift_data_dir | default(None) }}"
-      use_dnsmasq: "{{ openshift_use_dnsmasq | default(None) }}"
-
-- name: Install the base package for versioning
-  package:
-    name: "{{ openshift.common.service_type }}{{ openshift_pkg_version | default('') | oo_image_tag_to_rpm_version(include_dash=True) }}"
-    state: present
-  when: not openshift.common.is_containerized | bool
-
-- name: Set version facts
-  openshift_facts:
-
-# For enterprise versions < 3.1 and origin versions < 1.1 we want to set the
-# hostname by default.
-- set_fact:
-    set_hostname_default: "{{ not openshift.common.version_gte_3_1_or_1_1 }}"
-
-- name: Set hostname
-  command: >
-    hostnamectl set-hostname {{ openshift.common.hostname }}
-  when: openshift_set_hostname | default(set_hostname_default) | bool

+ 1 - 2
roles/openshift_examples/meta/main.yml

@@ -11,5 +11,4 @@ galaxy_info:
     - 7
   categories:
   - cloud
-dependencies:
-- role: openshift_common
+dependencies: []

+ 3 - 117
roles/openshift_facts/library/openshift_facts.py

@@ -449,78 +449,6 @@ def normalize_provider_facts(provider, metadata):
     return facts
 
 
-def set_flannel_facts_if_unset(facts):
-    """ Set flannel facts if not already present in facts dict
-            dict: the facts dict updated with the flannel facts if
-            missing
-        Args:
-            facts (dict): existing facts
-        Returns:
-            dict: the facts dict updated with the flannel
-            facts if they were not already present
-
-    """
-    if 'common' in facts:
-        if 'use_flannel' not in facts['common']:
-            use_flannel = False
-            facts['common']['use_flannel'] = use_flannel
-    return facts
-
-
-def set_calico_facts_if_unset(facts):
-    """ Set calico facts if not already present in facts dict
-            dict: the facts dict updated with the calico facts if
-            missing
-        Args:
-            facts (dict): existing facts
-        Returns:
-            dict: the facts dict updated with the calico
-            facts if they were not already present
-
-    """
-    if 'common' in facts:
-        if 'use_calico' not in facts['common']:
-            use_calico = False
-            facts['common']['use_calico'] = use_calico
-    return facts
-
-
-def set_nuage_facts_if_unset(facts):
-    """ Set nuage facts if not already present in facts dict
-            dict: the facts dict updated with the nuage facts if
-            missing
-        Args:
-            facts (dict): existing facts
-        Returns:
-            dict: the facts dict updated with the nuage
-            facts if they were not already present
-
-    """
-    if 'common' in facts:
-        if 'use_nuage' not in facts['common']:
-            use_nuage = False
-            facts['common']['use_nuage'] = use_nuage
-    return facts
-
-
-def set_contiv_facts_if_unset(facts):
-    """ Set contiv facts if not already present in facts dict
-            dict: the facts dict updated with the contiv facts if
-            missing
-        Args:
-            facts (dict): existing facts
-        Returns:
-            dict: the facts dict updated with the contiv
-            facts if they were not already present
-
-    """
-    if 'common' in facts:
-        if 'use_contiv' not in facts['common']:
-            use_contiv = False
-            facts['common']['use_contiv'] = use_contiv
-    return facts
-
-
 def set_node_schedulability(facts):
     """ Set schedulable facts if not already present in facts dict
         Args:
@@ -590,13 +518,8 @@ def set_dnsmasq_facts_if_unset(facts):
     """
 
     if 'common' in facts:
-        if 'use_dnsmasq' not in facts['common']:
-            facts['common']['use_dnsmasq'] = bool(safe_get_bool(facts['common']['version_gte_3_2_or_1_2']))
         if 'master' in facts and 'dns_port' not in facts['master']:
-            if safe_get_bool(facts['common']['use_dnsmasq']):
-                facts['master']['dns_port'] = 8053
-            else:
-                facts['master']['dns_port'] = 53
+            facts['master']['dns_port'] = 8053
 
     return facts
 
@@ -968,27 +891,6 @@ def set_version_facts_if_unset(facts):
     return facts
 
 
-def set_manageiq_facts_if_unset(facts):
-    """ Set manageiq facts. This currently includes common.use_manageiq.
-
-        Args:
-            facts (dict): existing facts
-        Returns:
-            dict: the facts dict updated with version facts.
-        Raises:
-            OpenShiftFactsInternalError:
-    """
-    if 'common' not in facts:
-        if 'version_gte_3_1_or_1_1' not in facts['common']:
-            raise OpenShiftFactsInternalError(
-                "Invalid invocation: The required facts are not set"
-            )
-    if 'use_manageiq' not in facts['common']:
-        facts['common']['use_manageiq'] = facts['common']['version_gte_3_1_or_1_1']
-
-    return facts
-
-
 def set_sdn_facts_if_unset(facts, system_facts):
     """ Set sdn facts if not already present in facts dict
 
@@ -999,15 +901,6 @@ def set_sdn_facts_if_unset(facts, system_facts):
             dict: the facts dict updated with the generated sdn facts if they
                   were not already present
     """
-    # pylint: disable=too-many-branches
-    if 'common' in facts:
-        use_sdn = facts['common']['use_openshift_sdn']
-        if not (use_sdn == '' or isinstance(use_sdn, bool)):
-            use_sdn = safe_get_bool(use_sdn)
-            facts['common']['use_openshift_sdn'] = use_sdn
-        if 'sdn_network_plugin_name' not in facts['common']:
-            plugin = 'redhat/openshift-ovs-subnet' if use_sdn else ''
-            facts['common']['sdn_network_plugin_name'] = plugin
 
     if 'master' in facts:
         # set defaults for sdn_cluster_network_cidr and sdn_host_subnet_length
@@ -1996,10 +1889,6 @@ class OpenShiftFacts(object):
         facts['current_config'] = get_current_config(facts)
         facts = set_url_facts_if_unset(facts)
         facts = set_project_cfg_facts_if_unset(facts)
-        facts = set_flannel_facts_if_unset(facts)
-        facts = set_calico_facts_if_unset(facts)
-        facts = set_nuage_facts_if_unset(facts)
-        facts = set_contiv_facts_if_unset(facts)
         facts = set_node_schedulability(facts)
         facts = set_selectors(facts)
         facts = set_identity_providers_if_unset(facts)
@@ -2011,7 +1900,6 @@ class OpenShiftFacts(object):
         facts = build_api_server_args(facts)
         facts = set_version_facts_if_unset(facts)
         facts = set_dnsmasq_facts_if_unset(facts)
-        facts = set_manageiq_facts_if_unset(facts)
         facts = set_aggregate_facts(facts)
         facts = set_etcd_facts_if_unset(facts)
         facts = set_proxy_facts(facts)
@@ -2039,7 +1927,7 @@ class OpenShiftFacts(object):
                            self.system_facts['ansible_fqdn']]
         hostname = choose_hostname(hostname_values, ip_addr)
 
-        defaults['common'] = dict(use_openshift_sdn=True, ip=ip_addr,
+        defaults['common'] = dict(ip=ip_addr,
                                   public_ip=ip_addr,
                                   deployment_type=deployment_type,
                                   deployment_subtype=deployment_subtype,
@@ -2048,10 +1936,8 @@ class OpenShiftFacts(object):
                                   portal_net='172.30.0.0/16',
                                   client_binary='oc', admin_binary='oadm',
                                   dns_domain='cluster.local',
-                                  install_examples=True,
                                   debug_level=2,
-                                  config_base='/etc/origin',
-                                  data_dir='/var/lib/origin')
+                                  config_base='/etc/origin')
 
         if 'master' in roles:
             defaults['master'] = dict(api_use_ssl=True, api_port='8443',

+ 0 - 1
roles/openshift_hosted/README.md

@@ -39,7 +39,6 @@ variables also control configuration behavior:
 Dependencies
 ------------
 
-* openshift_common
 * openshift_hosted_facts
 
 Example Playbook

+ 6 - 0
roles/openshift_hosted/defaults/main.yml

@@ -47,3 +47,9 @@ r_openshift_hosted_registry_os_firewall_allow:
 - service: Docker Registry Port
   port: 5000/tcp
   cond: "{{ r_openshift_hosted_use_calico }}"
+
+# NOTE
+# r_openshift_hosted_use_calico_default may be defined external to this role.
+# openshift_use_calico, if defined, may affect other roles or play behavior.
+r_openshift_hosted_use_calico_default: "{{ openshift_use_calico | default(False) }}"
+r_openshift_hosted_use_calico: "{{ r_openshift_hosted_use_calico_default }}"

+ 0 - 1
roles/openshift_hosted_logging/meta/main.yaml

@@ -1,4 +1,3 @@
 ---
 dependencies:
-  - { role: openshift_common }
   - { role: openshift_master_facts }

+ 1 - 2
roles/openshift_hosted_templates/meta/main.yml

@@ -11,5 +11,4 @@ galaxy_info:
     - 7
   categories:
   - cloud
-dependencies:
-- role: openshift_common
+dependencies: []

+ 7 - 1
roles/openshift_loadbalancer/defaults/main.yml

@@ -24,4 +24,10 @@ r_openshift_loadbalancer_os_firewall_allow:
   port: "{{ openshift_master_api_port | default(8443) }}/tcp"
 - service: nuage mon
   port: "{{ nuage_mon_rest_server_port | default(9443) }}/tcp"
-  cond: "{{ openshift_use_nuage | default(false) | bool }}"
+  cond: "{{ r_openshift_lb_use_nuage | bool }}"
+
+# NOTE
+# r_openshift_lb_use_nuage_default may be defined external to this role.
+# openshift_use_nuage, if defined, may affect other roles or play behavior.
+r_openshift_lb_use_nuage_default: "{{ openshift_use_nuage | default(False) }}"
+r_openshift_lb_use_nuage: "{{ r_openshift_lb_use_nuage_default }}"

+ 0 - 9
roles/openshift_master/README.md

@@ -17,7 +17,6 @@ From this role:
 
 | Name                                             | Default value         |                                                                               |
 |---------------------------------------------------|-----------------------|-------------------------------------------------------------------------------|
-| openshift_master_debug_level                      | openshift_debug_level | Verbosity of the debug logs for master                                        |
 | openshift_node_ips                                | []                    | List of the openshift node ip addresses to pre-register when master starts up |
 | oreg_url                                          | UNDEF                 | Default docker registry to use                                                |
 | oreg_url_master                                   | UNDEF                 | Default docker registry to use, specifically on the master                    |
@@ -29,18 +28,10 @@ From this role:
 | openshift_master_public_console_url               | UNDEF                 |                                                                               |
 | openshift_master_saconfig_limit_secret_references | false                 |                                                                               |
 
-From openshift_common:
-
-| Name                          | Default Value  |                                        |
-|-------------------------------|----------------|----------------------------------------|
-| openshift_debug_level         | 2              | Global openshift debug log verbosity   |
-| openshift_public_ip           | UNDEF          | Public IP address to use for this host |
-| openshift_hostname            | UNDEF          | hostname to use for this instance      |
 
 Dependencies
 ------------
 
-openshift_common
 
 Example Playbook
 ----------------

+ 20 - 1
roles/openshift_master/defaults/main.yml

@@ -22,5 +22,24 @@ r_openshift_master_os_firewall_allow:
 
 oreg_url: ''
 oreg_host: "{{ oreg_url.split('/')[0] if '.' in oreg_url.split('/')[0] else '' }}"
-oreg_auth_credentials_path: "{{ openshift.common.data_dir }}/.docker"
+oreg_auth_credentials_path: "{{ r_openshift_master_data_dir }}/.docker"
 oreg_auth_credentials_replace: False
+
+
+# NOTE
+# r_openshift_master_*_default may be defined external to this role.
+# openshift_use_*, if defined, may affect other roles or play behavior.
+r_openshift_master_use_openshift_sdn_default: "{{ openshift_use_openshift_sdn | default(True) }}"
+r_openshift_master_use_openshift_sdn: "{{ r_openshift_master_use_openshift_sdn_default }}"
+
+r_openshift_master_use_nuage_default: "{{ openshift_use_nuage | default(False) }}"
+r_openshift_master_use_nuage: "{{ r_openshift_master_use_nuage_default }}"
+
+r_openshift_master_use_contiv_default: "{{ openshift_use_contiv | default(False) }}"
+r_openshift_master_use_contiv: "{{ r_openshift_master_use_contiv_default }}"
+
+r_openshift_master_data_dir_default: "{{ openshift_data_dir | default('/var/lib/origin') }}"
+r_openshift_master_data_dir: "{{ r_openshift_master_data_dir_default }}"
+
+r_openshift_master_sdn_network_plugin_name_default: "{{ os_sdn_network_plugin_name | default('redhat/openshift-ovs-subnet') }}"
+r_openshift_master_sdn_network_plugin_name: "{{ r_openshift_master_sdn_network_plugin_name_default }}"

+ 1 - 1
roles/openshift_master/meta/main.yml

@@ -29,4 +29,4 @@ dependencies:
 - role: nickhammond.logrotate
 - role: contiv
   contiv_role: netmaster
-  when: openshift.common.use_contiv | bool
+  when: openshift_use_contiv | default(False) | bool

+ 3 - 3
roles/openshift_master/tasks/main.yml

@@ -47,9 +47,9 @@
   when:
   - not openshift.common.is_containerized | bool
 
-- name: Create openshift.common.data_dir
+- name: Create r_openshift_master_data_dir
   file:
-    path: "{{ openshift.common.data_dir }}"
+    path: "{{ r_openshift_master_data_dir }}"
     state: directory
     mode: 0755
     owner: root
@@ -169,7 +169,7 @@
     register: l_already_set
 
   - set_fact:
-      openshift_push_via_dns: "{{ (openshift_use_dnsmasq | default(true) and openshift.common.version_gte_3_6) or (l_already_set.stdout is defined and l_already_set.stdout | match('OPENSHIFT_DEFAULT_REGISTRY=docker-registry.default.svc:5000')) }}"
+      openshift_push_via_dns: "{{ openshift.common.version_gte_3_6 or (l_already_set.stdout is defined and l_already_set.stdout | match('OPENSHIFT_DEFAULT_REGISTRY=docker-registry.default.svc:5000')) }}"
 
 - name: Set fact of all etcd host IPs
   openshift_facts:

+ 7 - 0
roles/openshift_master/tasks/systemd_units.yml

@@ -10,6 +10,13 @@
     openshift_master_config_dir: '/etc/origin/master'
   when: openshift_master_config_dir is not defined
 
+# This play may be consumed outside the role, we need to ensure that
+# r_openshift_master_data_dir is set.
+- name: Set r_openshift_master_data_dir if unset
+  set_fact:
+    r_openshift_master_data_dir: "{{ openshift_data_dir | default('/var/lib/origin') }}"
+  when: r_openshift_master_data_dir is not defined
+
 - name: Remove the legacy master service if it exists
   include: clean_systemd_units.yml
 

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 2 - 2
roles/openshift_master/templates/docker-cluster/atomic-openshift-master-api.service.j2


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 2 - 2
roles/openshift_master/templates/docker-cluster/atomic-openshift-master-controllers.service.j2


+ 3 - 3
roles/openshift_master/templates/master.yaml.v1.j2

@@ -106,7 +106,7 @@ etcdConfig:
     clientCA: ca.crt
 {% endif %}
     keyFile: etcd.server.key
-  storageDirectory: {{ openshift.common.data_dir }}/openshift.local.etcd
+  storageDirectory: {{ r_openshift_master_data_dir }}/openshift.local.etcd
 {% endif %}
 etcdStorageConfig:
   kubernetesStoragePrefix: kubernetes.io
@@ -179,8 +179,8 @@ masterPublicURL: {{ openshift.master.public_api_url }}
 networkConfig:
   clusterNetworkCIDR: {{ openshift.master.sdn_cluster_network_cidr }}
   hostSubnetLength: {{ openshift.master.sdn_host_subnet_length }}
-{% if openshift.common.use_openshift_sdn or openshift.common.use_nuage or openshift.common.use_contiv or openshift.common.sdn_network_plugin_name == 'cni' %}
-  networkPluginName: {{ openshift.common.sdn_network_plugin_name }}
+{% if r_openshift_master_use_openshift_sdn or r_openshift_master_use_nuage or r_openshift_master_use_contiv or r_openshift_master_sdn_network_plugin_name == 'cni' %}
+  networkPluginName: {{ r_openshift_master_sdn_network_plugin_name_default }}
 {% endif %}
 # serviceNetworkCIDR must match kubernetesMasterConfig.servicesSubnet
   serviceNetworkCIDR: {{ openshift.common.portal_net }}

+ 1 - 1
roles/openshift_master/templates/native-cluster/atomic-openshift-master-api.service.j2

@@ -13,7 +13,7 @@ Environment=GOTRACEBACK=crash
 ExecStart=/usr/bin/openshift start master api --config=${CONFIG_FILE} $OPTIONS
 LimitNOFILE=131072
 LimitCORE=infinity
-WorkingDirectory={{ openshift.common.data_dir }}
+WorkingDirectory={{ r_openshift_master_data_dir }}
 SyslogIdentifier=atomic-openshift-master-api
 Restart=always
 RestartSec=5s

+ 1 - 1
roles/openshift_master/templates/native-cluster/atomic-openshift-master-controllers.service.j2

@@ -17,7 +17,7 @@ Environment=GOTRACEBACK=crash
 ExecStart=/usr/bin/openshift start master controllers --config=${CONFIG_FILE} $OPTIONS
 LimitNOFILE=131072
 LimitCORE=infinity
-WorkingDirectory={{ openshift.common.data_dir }}
+WorkingDirectory={{ r_openshift_master_data_dir }}
 SyslogIdentifier={{ openshift.common.service_type }}-master-controllers
 Restart=always
 RestartSec=5s

+ 0 - 10
roles/openshift_node/README.md

@@ -17,22 +17,12 @@ From this role:
 
 | Name                       | Default value         |                                                          |
 |----------------------------|-----------------------|----------------------------------------------------------|
-| openshift_node_debug_level | openshift_debug_level | Verbosity of the debug logs for node                     |
 | oreg_url                   | UNDEF (Optional)      | Default docker registry to use                           |
 | oreg_url_node              | UNDEF (Optional)      | Default docker registry to use, specifically on the node |
 
-From openshift_common:
-
-| Name                          |  Default Value      |                     |
-|-------------------------------|---------------------|---------------------|
-| openshift_debug_level         | 2                   | Global openshift debug log verbosity |
-| openshift_public_ip           | UNDEF (Required)    | Public IP address to use for this host |
-| openshift_hostname            | UNDEF (Required)    | hostname to use for this instance |
-
 Dependencies
 ------------
 
-openshift_common
 
 Example Playbook
 ----------------

+ 25 - 3
roles/openshift_node/defaults/main.yml

@@ -69,10 +69,10 @@ r_openshift_node_os_firewall_allow:
   port: 443/tcp
 - service: OpenShift OVS sdn
   port: 4789/udp
-  cond: openshift.common.use_openshift_sdn | default(true) | bool
+  cond: openshift_use_openshift_sdn | bool
 - service: Calico BGP Port
   port: 179/tcp
-  cond: "{{ openshift.common.use_calico | bool }}"
+  cond: "{{ openshift_node_use_calico }}"
 - service: Kubernetes service NodePort TCP
   port: "{{ openshift_node_port_range | default('') }}/tcp"
   cond: "{{ openshift_node_port_range is defined }}"
@@ -82,5 +82,27 @@ r_openshift_node_os_firewall_allow:
 
 oreg_url: ''
 oreg_host: "{{ oreg_url.split('/')[0] if '.' in oreg_url.split('/')[0] else '' }}"
-oreg_auth_credentials_path: "{{ openshift.common.data_dir }}/.docker"
+oreg_auth_credentials_path: "{{ openshift_node_data_dir }}/.docker"
 oreg_auth_credentials_replace: False
+
+
+# NOTE
+# r_openshift_node_*_default may be defined external to this role.
+# openshift_use_*, if defined, may affect other roles or play behavior.
+openshift_node_use_openshift_sdn_default: "{{ openshift_use_openshift_sdn | default(True) }}"
+openshift_node_use_openshift_sdn: "{{ openshift_node_use_openshift_sdn_default }}"
+
+openshift_node_sdn_network_plugin_name_default: "{{ os_sdn_network_plugin_name | default('redhat/openshift-ovs-subnet') }}"
+openshift_node_sdn_network_plugin_name: "{{ openshift_node_sdn_network_plugin_name_default }}"
+
+openshift_node_use_calico_default: "{{ openshift_use_calico | default(False) }}"
+openshift_node_use_calico: "{{ openshift_node_use_calico_default }}"
+
+openshift_node_use_nuage_default: "{{ openshift_use_nuage | default(False) }}"
+openshift_node_use_nuage: "{{ openshift_node_use_nuage_default }}"
+
+openshift_node_use_contiv_default: "{{ openshift_use_contiv | default(False) }}"
+openshift_node_use_contiv: "{{ openshift_node_use_contiv_default }}"
+
+openshift_node_data_dir_default: "{{ openshift_data_dir | default('/var/lib/origin') }}"
+openshift_node_data_dir: "{{ openshift_node_data_dir_default }}"

+ 1 - 1
roles/openshift_node/handlers/main.yml

@@ -3,7 +3,7 @@
   systemd:
     name: openvswitch
     state: restarted
-  when: (not skip_node_svc_handlers | default(False) | bool) and not (ovs_service_status_changed | default(false) | bool) and openshift.common.use_openshift_sdn | default(true) | bool
+  when: (not skip_node_svc_handlers | default(False) | bool) and not (ovs_service_status_changed | default(false) | bool) and openshift_node_use_openshift_sdn | bool
   register: l_openshift_node_stop_openvswitch_result
   until: not l_openshift_node_stop_openvswitch_result | failed
   retries: 3

+ 0 - 2
roles/openshift_node/meta/main.yml

@@ -15,11 +15,9 @@ dependencies:
 - role: openshift_node_facts
 - role: lib_openshift
 - role: lib_os_firewall
-- role: openshift_common
 - role: openshift_clock
 - role: openshift_docker
 - role: openshift_node_certificates
   when: not openshift_node_bootstrap
 - role: openshift_cloud_provider
 - role: openshift_node_dnsmasq
-  when: openshift.common.use_dnsmasq | bool

+ 1 - 1
roles/openshift_node/tasks/config.yml

@@ -22,7 +22,7 @@
     daemon_reload: yes
   when:
     - openshift.common.is_containerized | bool
-    - openshift.common.use_openshift_sdn | default(true) | bool
+    - openshift_node_use_openshift_sdn | default(true) | bool
   register: ovs_start_result
   until: not ovs_start_result | failed
   retries: 3

+ 1 - 1
roles/openshift_node/tasks/install.yml

@@ -13,7 +13,7 @@
       name: "{{ openshift.common.service_type }}-sdn-ovs{{ openshift_pkg_version | oo_image_tag_to_rpm_version(include_dash=True) }}"
       state: present
     when:
-    - openshift.common.use_openshift_sdn | default(true) | bool
+    - openshift_node_use_openshift_sdn | bool
 
   - name: Install conntrack-tools package
     package:

+ 1 - 1
roles/openshift_node/tasks/main.yml

@@ -121,4 +121,4 @@
 ##### END Storage #####
 
 - include: config/workaround-bz1331590-ovs-oom-fix.yml
-  when: openshift.common.use_openshift_sdn | default(true) | bool
+  when: openshift_node_use_openshift_sdn | default(true) | bool

+ 2 - 2
roles/openshift_node/tasks/systemd_units.yml

@@ -26,7 +26,7 @@
   - name: Install OpenvSwitch system containers
     include: openvswitch_system_container.yml
     when:
-    - openshift.common.use_openshift_sdn | default(true) | bool
+    - openshift_node_use_openshift_sdn | bool
     - openshift.common.is_openvswitch_system_container | bool
 
 - block:
@@ -39,7 +39,7 @@
   - include: config/install-ovs-docker-service-file.yml
   when:
   - openshift.common.is_containerized | bool
-  - openshift.common.use_openshift_sdn | default(true) | bool
+  - openshift_node_use_openshift_sdn | bool
   - not openshift.common.is_openvswitch_system_container | bool
 
 - include: config/configure-node-settings.yml

+ 5 - 5
roles/openshift_node/templates/node.yaml.v1.j2

@@ -37,15 +37,15 @@ masterClientConnectionOverrides:
   qps: 100
 {% endif %}
 masterKubeConfig: system:node:{{ openshift.common.hostname }}.kubeconfig
-{% if openshift.common.use_openshift_sdn | bool %}
-networkPluginName: {{ openshift.common.sdn_network_plugin_name }}
+{% if openshift_node_use_openshift_sdn | bool %}
+networkPluginName: {{ openshift_node_sdn_network_plugin_name }}
 {% endif %}
 # networkConfig struct introduced in origin 1.0.6 and OSE 3.0.2 which
 # deprecates networkPluginName above. The two should match.
 networkConfig:
    mtu: {{ openshift.node.sdn_mtu }}
-{% if openshift.common.use_openshift_sdn | bool or openshift.common.use_nuage | bool or openshift.common.use_contiv | bool or openshift.common.sdn_network_plugin_name == 'cni' %}
-   networkPluginName: {{ openshift.common.sdn_network_plugin_name }}
+{% if openshift_node_use_openshift_sdn | bool or openshift_node_use_nuage | bool or openshift_node_use_contiv | bool or openshift_node_sdn_network_plugin_name == 'cni' %}
+   networkPluginName: {{ openshift_node_sdn_network_plugin_name }}
 {% endif %}
 {% if openshift.node.set_node_ip | bool %}
 nodeIP: {{ openshift.common.ip }}
@@ -66,7 +66,7 @@ servingInfo:
   - {{ cipher_suite }}
 {% endfor %}
 {% endif %}
-volumeDirectory: {{ openshift.common.data_dir }}/openshift.local.volumes
+volumeDirectory: {{ openshift_node_data_dir }}/openshift.local.volumes
 proxyArguments:
   proxy-mode:
      - {{ openshift.node.proxy_mode }}

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 2 - 2
roles/openshift_node/templates/openshift.docker.node.service


+ 0 - 1
roles/openshift_node_dnsmasq/meta/main.yml

@@ -12,5 +12,4 @@ galaxy_info:
   categories:
   - cloud
 dependencies:
-- role: openshift_common
 - role: openshift_node_facts

+ 1 - 3
roles/openshift_node_upgrade/README.md

@@ -32,14 +32,12 @@ From openshift.common:
 | Name                               |  Default Value      |                     |
 |------------------------------------|---------------------|---------------------|
 | openshift.common.config_base       |---------------------|---------------------|
-| openshift.common.data_dir          |---------------------|---------------------|
 | openshift.common.hostname          |---------------------|---------------------|
 | openshift.common.http_proxy        |---------------------|---------------------|
 | openshift.common.is_atomic         |---------------------|---------------------|
 | openshift.common.is_containerized  |---------------------|---------------------|
 | openshift.common.portal_net        |---------------------|---------------------|
 | openshift.common.service_type      |---------------------|---------------------|
-| openshift.common.use_openshift_sdn |---------------------|---------------------|
 
 From openshift.master:
 
@@ -58,7 +56,7 @@ From openshift.node:
 
 Dependencies
 ------------
-openshift_common
+
 
 TODO
 

+ 5 - 0
roles/openshift_node_upgrade/defaults/main.yml

@@ -1 +1,6 @@
 ---
+openshift_use_openshift_sdn: True
+os_sdn_network_plugin_name: "redhat/openshift-ovs-subnet"
+
+openshift_node_data_dir_default: "{{ openshift_data_dir | default('/var/lib/origin') }}"
+openshift_node_data_dir: "{{ openshift_node_data_dir_default }}"

+ 1 - 1
roles/openshift_node_upgrade/handlers/main.yml

@@ -6,7 +6,7 @@
   when:
   - not skip_node_svc_handlers | default(False) | bool
   - not (ovs_service_status_changed | default(false) | bool)
-  - openshift.common.use_openshift_sdn | default(true) | bool
+  - openshift_use_openshift_sdn | bool
   register: l_openshift_node_upgrade_stop_openvswitch_result
   until: not l_openshift_node_upgrade_stop_openvswitch_result | failed
   retries: 3

+ 0 - 1
roles/openshift_node_upgrade/meta/main.yml

@@ -11,4 +11,3 @@ galaxy_info:
     - 7
 dependencies:
 - role: lib_utils
-- role: openshift_common

+ 2 - 2
roles/openshift_node_upgrade/tasks/main.yml

@@ -44,7 +44,7 @@
   changed_when: "'Downloaded newer image' in pull_result.stdout"
   when:
   - openshift.common.is_containerized | bool
-  - openshift.common.use_openshift_sdn | default(true) | bool
+  - openshift_use_openshift_sdn | bool
 
 - include: docker/upgrade.yml
   vars:
@@ -142,7 +142,7 @@
   # End Disable Swap Block
 
 - name: Reset selinux context
-  command: restorecon -RF {{ openshift.common.data_dir }}/openshift.local.volumes
+  command: restorecon -RF {{ openshift_node_data_dir }}/openshift.local.volumes
   when:
   - ansible_selinux is defined
   - ansible_selinux.status == 'enabled'

+ 3 - 3
roles/openshift_node_upgrade/tasks/systemd_units.yml

@@ -4,7 +4,7 @@
 # - openshift_image_tag
 # - openshift.common.is_containerized
 # - openshift.node.ovs_image
-# - openshift.common.use_openshift_sdn
+# - openshift_use_openshift_sdn
 # - openshift.common.service_type
 # - openshift.node.debug_level
 # - openshift.common.config_base
@@ -28,10 +28,10 @@
   when: openshift.common.is_containerized | bool
 
 - include: config/workaround-bz1331590-ovs-oom-fix.yml
-  when: openshift.common.use_openshift_sdn | default(true) | bool
+  when: openshift_use_openshift_sdn | bool
 
 - include: config/install-ovs-docker-service-file.yml
-  when: openshift.common.is_containerized | bool and openshift.common.use_openshift_sdn | default(true) | bool
+  when: openshift.common.is_containerized | bool and openshift_use_openshift_sdn | bool
 
 - include: config/configure-node-settings.yml
 - include: config/configure-proxy-settings.yml

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 2 - 2
roles/openshift_node_upgrade/templates/openshift.docker.node.service


+ 0 - 7
roles/openshift_persistent_volumes/README.md

@@ -17,13 +17,6 @@ From this role:
 | persistent_volume_claims | []            | List of persistent volume claim dictionaries, keys: name, capacity, access_modes    |
 
 
-From openshift_common:
-
-| Name                          | Default Value  |                                        |
-|-------------------------------|----------------|----------------------------------------|
-| openshift_debug_level         | 2              | Global openshift debug log verbosity   |
-
-
 Dependencies
 ------------
 

+ 0 - 1
roles/openshift_persistent_volumes/meta/main.yml

@@ -10,5 +10,4 @@ galaxy_info:
     versions:
     - 7
 dependencies:
-- role: openshift_common
 - role: openshift_hosted_facts

+ 4 - 0
roles/openshift_service_catalog/defaults/main.yml

@@ -1,3 +1,7 @@
 ---
 openshift_service_catalog_remove: false
 openshift_service_catalog_nodeselector: {"openshift-infra": "apiserver"}
+
+openshift_use_openshift_sdn: True
+# os_sdn_network_plugin_name: "{% if openshift_use_openshift_sdn %}redhat/openshift-ovs-subnet{% else %}{% endif %}"
+os_sdn_network_plugin_name: "redhat/openshift-ovs-subnet"

+ 1 - 1
roles/openshift_service_catalog/tasks/install.yml

@@ -28,7 +28,7 @@
 - name: Make kube-service-catalog project network global
   command: >
     oc adm pod-network make-projects-global kube-service-catalog
-  when: os_sdn_network_plugin_name | default('') == 'redhat/openshift-ovs-multitenant'
+  when: os_sdn_network_plugin_name == 'redhat/openshift-ovs-multitenant'
 
 - include: generate_certs.yml
 

+ 6 - 0
roles/openshift_version/tasks/main.yml

@@ -5,6 +5,12 @@
     is_containerized: "{{ openshift.common.is_containerized | default(False) | bool }}"
     is_atomic: "{{ openshift.common.is_atomic | default(False) | bool }}"
 
+- name: Install the base package for versioning
+  package:
+    name: "{{ openshift.common.service_type }}{{ openshift_pkg_version | default('') | oo_image_tag_to_rpm_version(include_dash=True) }}"
+    state: present
+  when: not is_containerized | bool
+
 # Block attempts to install origin without specifying some kind of version information.
 # This is because the latest tags for origin are usually alpha builds, which should not
 # be used by default. Users must indicate what they want.