mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-07 09:27:38 -02:30
Merge pull request #1071 from vijaykatam/atomic_host
Add support for atomic host
This commit is contained in:
@@ -50,7 +50,11 @@ spec:
|
||||
volumes:
|
||||
- name: ssl-certs-host
|
||||
hostPath:
|
||||
{% if ansible_os_family == 'RedHat' %}
|
||||
path: /etc/pki/tls
|
||||
{% else %}
|
||||
path: /usr/share/ca-certificates
|
||||
{% endif %}
|
||||
- name: "kubeconfig"
|
||||
hostPath:
|
||||
path: "{{kube_config_dir}}/node-kubeconfig.yaml"
|
||||
|
||||
@@ -3,3 +3,4 @@ dependencies:
|
||||
- role: adduser
|
||||
user: "{{ addusers.kube }}"
|
||||
tags: kubelet
|
||||
when: not is_atomic
|
||||
@@ -91,7 +91,7 @@
|
||||
yum:
|
||||
update_cache: yes
|
||||
name: '*'
|
||||
when: ansible_pkg_mgr == 'yum'
|
||||
when: ansible_pkg_mgr == 'yum' and not is_atomic
|
||||
tags: bootstrap-os
|
||||
|
||||
- name: Install latest version of python-apt for Debian distribs
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
- name: Install epel-release on RedHat/CentOS
|
||||
shell: rpm -qa | grep epel-release || rpm -ivh {{ epel_rpm_download_url }}
|
||||
when: ansible_distribution in ["CentOS","RedHat"]
|
||||
when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
tags: bootstrap-os
|
||||
@@ -127,7 +127,7 @@
|
||||
retries: 4
|
||||
delay: "{{ retry_stagger | random + 3 }}"
|
||||
with_items: "{{required_pkgs | default([]) | union(common_required_pkgs|default([]))}}"
|
||||
when: not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
|
||||
when: not (ansible_os_family in ["CoreOS", "Container Linux by CoreOS"] or is_atomic)
|
||||
tags: bootstrap-os
|
||||
|
||||
# Todo : selinux configuration
|
||||
|
||||
@@ -83,5 +83,17 @@
|
||||
- set_fact:
|
||||
peer_with_calico_rr: "{{ 'calico-rr' in groups and groups['calico-rr']|length > 0 }}"
|
||||
|
||||
- name: check if atomic host
|
||||
stat:
|
||||
path: /run/ostree-booted
|
||||
register: ostree
|
||||
|
||||
- set_fact:
|
||||
is_atomic: "{{ ostree.stat.exists }}"
|
||||
|
||||
- set_fact:
|
||||
kube_cert_group: "kube"
|
||||
when: is_atomic
|
||||
|
||||
- include: set_resolv_facts.yml
|
||||
tags: [bootstrap-os, resolvconf, facts]
|
||||
|
||||
Reference in New Issue
Block a user