Consolidate openshift-ansible global variables

Merge openshift/global_defaults.yml into openshift/global_vars.yml file
since they serve the exact same purpose.

Also remove duplicated variables that were set in inventory file for
glusterfs nodes.

Change-Id: Ic0fb84fb7c711d4706b75885e69cbd052cd56f42
This commit is contained in:
Martin André 2018-09-24 11:30:27 +02:00 committed by John Trowbridge
parent d90bb11ea4
commit c67c345541
3 changed files with 2 additions and 15 deletions

View File

@ -195,8 +195,4 @@ outputs:
glusterfs_ip: {{hostvars.raw_get(host)['storage_ip']}}
glusterfs_devices:
{{openshift_gluster_disks | to_nice_yaml() | indent(8) }}
ansible_user: {{ hostvars.raw_get(host)['ansible_user'] | default(hostvars.raw_get(host)['ansible_ssh_user']) | default('root') }}
ansible_host: {{ hostvars.raw_get(host)['ansible_host'] | default(host) }}
ansible_become: true
openshift_schedulable: true
{% endfor %}

View File

@ -149,11 +149,13 @@ outputs:
image: {get_param: DockerOpenShiftBaseImage}
openshift_enable_excluders: false
openshift_deployment_type: origin
openshift_use_dnsmasq: true
openshift_use_external_openvswitch: true
openshift_docker_selinux_enabled: false
# Disable services we're not using for now
openshift_enable_service_catalog: false
template_service_broker_install: false
containerized: true
# Needed for containerized deployment
skip_version: true
# Fatal and Errors only
@ -266,15 +268,6 @@ outputs:
new_nodes: {}
{% if groups['openshift_glusterfs'] | default([]) %}glusterfs: {}{% endif %}
- name: generate openshift global defaults
copy:
dest: "{{playbook_dir}}/openshift/global_defaults.yml"
content: |
containerized: true
openshift_master_cluster_method: native
openshift_use_dnsmasq: true
openshift_use_external_openvswitch: true
- name: generate openshift global vars
copy:
dest: "{{playbook_dir}}/openshift/global_vars.yml"
@ -423,7 +416,6 @@ outputs:
ANSIBLE_HOST_KEY_CHECKING=False
ansible-playbook
-i '{{playbook_dir}}/openshift/inventory'
--extra-vars '@{{playbook_dir}}/openshift/global_defaults.yml'
--extra-vars '@{{playbook_dir}}/openshift/global_vars.yml'
{% if groups['openshift_glusterfs'] | default([]) %}
--extra-vars '@{{playbook_dir}}/openshift/global_gluster_vars.yml'

View File

@ -99,7 +99,6 @@ outputs:
ansible_user: "{{ hostvars[item]['ansible_user'] | default(hostvars[item]['ansible_ssh_user']) | default('root') }}"
ansible_host: "{{ hostvars[item]['ansible_host'] | default(item) }}"
ansible_become: true
containerized: true
openshift_node_group_name: '{{tripleo_node_group_name}}'
etcd_ip: "{{hostvars[item][openshift_master_network + '_ip']}}"
openshift_ip: "{{hostvars[item][openshift_master_network + '_ip']}}"