Skip to content
Snippets Groups Projects
Unverified Commit c70c44b0 authored by Aivars Sterns's avatar Aivars Sterns Committed by GitHub
Browse files

Merge pull request #2257 from rzenker/tb/baremetal-tweaks

baremetal tweaks
parents 20583e3d ad9049a4
No related branches found
No related tags found
No related merge requests found
...@@ -2,3 +2,5 @@ ...@@ -2,3 +2,5 @@
pip_python_coreos_modules: pip_python_coreos_modules:
- httplib2 - httplib2
- six - six
override_system_hostname: true
...@@ -29,12 +29,12 @@ ...@@ -29,12 +29,12 @@
- name: Assign inventory name to unconfigured hostnames (non-CoreOS) - name: Assign inventory name to unconfigured hostnames (non-CoreOS)
hostname: hostname:
name: "{{inventory_hostname}}" name: "{{inventory_hostname}}"
when: ansible_os_family not in ['CoreOS', 'Container Linux by CoreOS'] when: ansible_os_family not in ['CoreOS', 'Container Linux by CoreOS'] and override_system_hostname
- name: Assign inventory name to unconfigured hostnames (CoreOS only) - name: Assign inventory name to unconfigured hostnames (CoreOS only)
command: "hostnamectl set-hostname {{inventory_hostname}}" command: "hostnamectl set-hostname {{inventory_hostname}}"
register: hostname_changed register: hostname_changed
when: ansible_hostname == 'localhost' and ansible_os_family in ['CoreOS', 'Container Linux by CoreOS'] when: ansible_hostname == 'localhost' and ansible_os_family in ['CoreOS', 'Container Linux by CoreOS'] and override_system_hostname
- name: Update hostname fact (CoreOS only) - name: Update hostname fact (CoreOS only)
setup: setup:
......
...@@ -84,7 +84,7 @@ kube_hyperkube_image_repo: "" ...@@ -84,7 +84,7 @@ kube_hyperkube_image_repo: ""
kube_override_hostname: >- kube_override_hostname: >-
{%- if cloud_provider is defined and cloud_provider in [ 'aws' ] -%} {%- if cloud_provider is defined and cloud_provider in [ 'aws' ] -%}
{%- else -%} {%- else -%}
{{ ansible_hostname }} {{ inventory_hostname }}
{%- endif -%} {%- endif -%}
# cAdvisor port # cAdvisor port
......
...@@ -14,6 +14,6 @@ data: ...@@ -14,6 +14,6 @@ data:
cluster_type: "kubespray,bgp" cluster_type: "kubespray,bgp"
{% endif %} {% endif %}
calico_backend: "bird" calico_backend: "bird"
{%- if inventory_hostname in groups['k8s-cluster'] and peer_with_router|default(false) %} {% if inventory_hostname in groups['k8s-cluster'] and peer_with_router|default(false) %}
as: "{{ local_as }}" as: "{{ local_as|default(global_as_num) }}"
{% endif -%} {% endif -%}
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
{% if cloud_provider is defined %} {% if cloud_provider is defined %}
"nodename": "{{ calico_kubelet_name.stdout }}", "nodename": "{{ calico_kubelet_name.stdout }}",
{% else %} {% else %}
"nodename": "{{ ansible_hostname }}", "nodename": "{{ inventory_hostname }}",
{% endif %} {% endif %}
"type": "calico", "type": "calico",
"etcd_endpoints": "{{ etcd_access_addresses }}", "etcd_endpoints": "{{ etcd_access_addresses }}",
......
--- ---
flush_iptables: true flush_iptables: true
reset_restart_network: true
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
networking networking
{%- endif %} {%- endif %}
state: restarted state: restarted
when: ansible_os_family not in ["CoreOS", "Container Linux by CoreOS"] when: ansible_os_family not in ["CoreOS", "Container Linux by CoreOS"] and reset_restart_network
tags: tags:
- services - services
- network - network
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment