Jelajahi Sumber

Merge pull request #11299 from jstuever/byoh221

Merge openshift_facts role into openshift_node40
OpenShift Merge Robot 6 tahun lalu
induk
melakukan
992ed9f775

+ 0 - 2
playbooks/init/basic_facts.yml

@@ -8,8 +8,6 @@
   # l_init_fact_hosts is passed in via play during control-plane-only
   # upgrades and scale-up plays; otherwise oo_all_hosts is used.
   hosts: "{{ l_init_fact_hosts | default('oo_all_hosts') }}"
-  roles:
-  - role: openshift_facts
   tasks:
 
   - name: Detect OS Variant from /etc/os-release

+ 0 - 34
roles/openshift_facts/README.md

@@ -1,34 +0,0 @@
-OpenShift Facts
-===============
-
-Provides the openshift_facts module
-
-Requirements
-------------
-
-None
-
-Role Variables
---------------
-
-None
-
-Dependencies
-------------
-
-None
-
-Example Playbook
-----------------
-
-TODO
-
-License
--------
-
-Apache License, Version 2.0
-
-Author Information
-------------------
-
-Jason DeTiberus (jdetiber@redhat.com)

+ 0 - 144
roles/openshift_facts/defaults/main.yml

@@ -1,144 +0,0 @@
----
-openshift_client_binary: "oc"
-
-system_images_registry_dict:
-  openshift-enterprise: "registry.redhat.io"
-  origin: "docker.io"
-system_images_registry: "{{ system_images_registry_dict[openshift_deployment_type | default('origin')] }}"
-
-l_openshift_images_dict:
-  origin: 'docker.io/openshift/origin-${component}:${version}'
-  openshift-enterprise: 'registry.redhat.io/openshift3/ose-${component}:${version}'
-
-l_osm_registry_url_default: "{{ l_openshift_images_dict[openshift_deployment_type] }}"
-l_oreg_host_temp: "{{ oreg_url | default(l_osm_registry_url_default) }}"
-# oreg_url is defined by user input.
-oreg_host: "{{ l_oreg_host_temp.split('/')[0] }}"
-
-# Used to define a list of registry credentials
-# ex openshift_additional_registry_credentials=[{'host':'registry.redhat.io','user':'bob','password':'redhat'},{'host':'registry.connect.redhat.com','user':'alice','password':'redhat','test_login':False}]
-openshift_additional_registry_credentials: []
-
-# this variable does not replace ${version} with openshift_image_tag
-l_os_non_standard_reg_url: "{{ oreg_url | default(l_osm_registry_url_default) }}"
-
-l_docker_creds_image_dict:
-  openshift-enterprise: 'openshift3/ose'
-  origin: 'openshift/origin'
-l_docker_creds_test_image: "{{ l_docker_creds_image_dict[openshift_deployment_type] }}"
-
-l_docker_creds_http_proxy: "{{ 'HTTP_PROXY=' ~ openshift.common.http_proxy if openshift.common.http_proxy is defined and openshift.common.http_proxy != '' else ''}}"
-l_docker_creds_https_proxy: "{{ 'HTTPS_PROXY=' ~ openshift.common.https_proxy if openshift.common.https_proxy is defined and openshift.common.https_proxy != '' else ''}}"
-l_docker_creds_no_proxy: "{{ 'NO_PROXY=' ~ openshift.common.no_proxy if openshift.common.no_proxy is defined and openshift.common.no_proxy != '' else ''}}"
-l_docker_creds_proxy_vars: "{{ l_docker_creds_http_proxy }} {{ l_docker_creds_https_proxy }} {{ l_docker_creds_no_proxy }}"
-
-l_osm_registry_url: "{{ oreg_url | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
-l_os_registry_url: "{{ oreg_url | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
-openshift_image_default: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'node') }}"
-# not sure why this one is more complicated than other images
-openshift_cli_image: "{{ (system_images_registry == 'docker') | ternary(openshift_image_default, (openshift_image_default.split('/')|length==2) | ternary(system_images_registry + '/' + openshift_image_default, openshift_image_default)) }}"
-system_openshift_cli_image: "{{ (system_images_registry == 'docker') | ternary('docker:' + openshift_cli_image, openshift_cli_image) }}"
-osn_image: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'node') }}"
-osn_pod_image: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'pod') }}"
-osm_image: "{{ l_osm_registry_url | regex_replace('${component}' | regex_escape, 'control-plane') }}"
-
-repoquery_cmd: "{{ (ansible_pkg_mgr == 'dnf') | ternary('dnf repoquery --latest-limit 1 -d 0', 'repoquery --plugins') }}"
-repoquery_installed: "{{ (ansible_pkg_mgr == 'dnf') | ternary('dnf repoquery --latest-limit 1 -d 0 --disableexcludes=all --installed', 'repoquery --plugins --installed') }}"
-
-openshift_use_crio: True
-openshift_use_crio_only: True
-openshift_crio_enable_docker_gc: False
-openshift_crio_var_sock: "/var/run/crio/crio.sock"
-openshift_crio_pause_image: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'pod') | regex_replace('${version}' | regex_escape, 'v4.0') }}"
-openshift_container_cli: "{{ openshift_use_crio | bool | ternary('crictl', 'docker') }}"
-openshift_crio_docker_gc_node_selector:
-  runtime: 'cri-o'
-
-# osm_default_subdomain is an old migrated fact, can probably be removed.
-osm_default_subdomain: "router.default.svc.cluster.local"
-openshift_master_default_subdomain: "{{ osm_default_subdomain }}"
-
-openshift_portal_net: "{{ openshift_master_portal_net | default(None) }}"
-openshift_cluster_network_cidr: "{{ osm_cluster_network_cidr | default('10.128.0.0/14') }}"
-openshift_host_subnet_length: "{{ osm_host_subnet_length | default('9') }}"
-
-openshift_hosted_etcd_storage_nfs_directory: '/exports'
-openshift_hosted_etcd_storage_nfs_options: '*(rw,root_squash)'
-openshift_hosted_etcd_storage_volume_name: 'etcd'
-openshift_hosted_etcd_storage_volume_size: '1Gi'
-openshift_hosted_etcd_storage_create_pv: True
-openshift_hosted_etcd_storage_create_pvc: False
-openshift_hosted_etcd_storage_access_modes:
-  - 'ReadWriteOnce'
-
-openshift_hosted_registry_namespace: 'default'
-openshift_hosted_registry_storage_volume_name: 'registry'
-openshift_hosted_registry_storage_volume_size: '5Gi'
-openshift_hosted_registry_storage_create_pv: True
-openshift_hosted_registry_storage_create_pvc: True
-openshift_hosted_registry_storage_nfs_directory: '/exports'
-openshift_hosted_registry_storage_nfs_options: '*(rw,root_squash)'
-openshift_hosted_registry_storage_glusterfs_endpoints: 'glusterfs-registry-endpoints'
-openshift_hosted_registry_storage_glusterfs_path: glusterfs-registry-volume
-openshift_hosted_registry_storage_glusterfs_readOnly: False
-openshift_hosted_registry_storage_glusterfs_swap: False
-openshift_hosted_registry_storage_glusterfs_swapcopy: True
-openshift_hosted_registry_storage_glusterfs_ips: []
-openshift_hosted_registry_storage_hostpath_path: /var/lib/openshift_volumes
-# Default to ReadWriteOnce if using hostpath, else default to ReadWriteMany
-openshift_hosted_registry_storage_access_modes:
-  - "{{ (openshift_hosted_registry_storage_kind | default(none) == 'hostpath') | ternary('ReadWriteOnce', 'ReadWriteMany') }}"
-
-openshift_hosted_registry_glusterfs_namespace: "{{ openshift_hosted_registry_namespace }}"
-openshift_hosted_registry_glusterfs_storage_kind: 'glusterfs'
-openshift_hosted_registry_glusterfs_storage_volume_name: "{{ openshift_hosted_registry_storage_volume_name }}-glusterfs"
-openshift_hosted_registry_glusterfs_storage_volume_size: "{{ openshift_hosted_registry_storage_volume_size }}"
-openshift_hosted_registry_glusterfs_storage_create_pv: False
-openshift_hosted_registry_glusterfs_storage_create_pvc: False
-openshift_hosted_registry_glusterfs_storage_glusterfs_endpoints: "{{ openshift_hosted_registry_storage_glusterfs_endpoints }}"
-openshift_hosted_registry_glusterfs_storage_glusterfs_path: "{{ openshift_hosted_registry_storage_glusterfs_path }}"
-openshift_hosted_registry_glusterfs_storage_glusterfs_readOnly: "{{ openshift_hosted_registry_storage_glusterfs_readOnly }}"
-openshift_hosted_registry_glusterfs_storage_glusterfs_ips: "{{ openshift_hosted_registry_storage_glusterfs_ips }}"
-openshift_hosted_registry_glusterfs_storage_access_modes:
-  - 'ReadWriteMany'
-
-openshift_logging_storage_nfs_directory: '/exports'
-openshift_logging_storage_nfs_options: '*(rw,root_squash)'
-openshift_logging_storage_volume_name: 'logging-es'
-openshift_logging_storage_create_pv: True
-openshift_logging_storage_create_pvc: False
-openshift_logging_storage_access_modes:
-  - ['ReadWriteOnce']
-
-openshift_loggingops_storage_volume_name: 'logging-es-ops'
-openshift_loggingops_storage_volume_size: '10Gi'
-openshift_loggingops_storage_create_pv: True
-openshift_loggingops_storage_create_pvc: False
-openshift_loggingops_storage_nfs_directory: '/exports'
-openshift_loggingops_storage_nfs_options: '*(rw,root_squash)'
-openshift_loggingops_storage_access_modes:
-  - 'ReadWriteOnce'
-
-openshift_metrics_deploy: False
-openshift_metrics_duration: 7
-openshift_metrics_resolution: '10s'
-openshift_metrics_storage_volume_name: 'metrics'
-openshift_metrics_storage_volume_size: '10Gi'
-openshift_metrics_storage_create_pv: True
-openshift_metrics_storage_create_pvc: False
-openshift_metrics_storage_nfs_directory: '/exports'
-openshift_metrics_storage_nfs_options: '*(rw,root_squash)'
-openshift_metrics_storage_access_modes:
-  - 'ReadWriteOnce'
-
-openshift_service_type_dict:
-  origin: origin
-  openshift-enterprise: atomic-openshift
-
-openshift_service_type: "{{ openshift_service_type_dict[openshift_deployment_type] }}"
-openshift_master_api_port: "6443"
-openshift_ca_host: "{{ groups.oo_first_master.0 }}"
-openshift_use_openshift_sdn: true
-os_sdn_network_plugin_name: "redhat/openshift-ovs-subnet"
-
-openshift_master_manage_htpasswd: True

File diff ditekan karena terlalu besar
+ 0 - 1300
roles/openshift_facts/library/openshift_facts.py


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

@@ -1,15 +0,0 @@
----
-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: []

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

@@ -3,6 +3,12 @@ openshift_release_image: "registry.svc.ci.openshift.org/openshift/origin-release
 ign_file: "/tmp/bootstrap.ign"
 pull_secret: "{{ files_dir }}/pull-secret"
 tls_verify: false
+
+openshift_service_type_dict:
+  origin: origin
+  openshift-enterprise: atomic-openshift
+openshift_service_type: "{{ openshift_service_type_dict[openshift_deployment_type] }}"
+
 openshift_node_install_packages:
   - cri-o
   - cri-tools

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

@@ -14,4 +14,3 @@ galaxy_info:
 dependencies:
 - role: lib_openshift
 - role: lib_utils
-- role: openshift_facts