2015-10-04 04:19:50 +08:00
|
|
|
---
|
2016-12-21 07:00:46 +08:00
|
|
|
- name: Trust kubelet container
|
|
|
|
command: >-
|
|
|
|
/usr/bin/rkt trust
|
|
|
|
--skip-fingerprint-review
|
|
|
|
--root
|
|
|
|
{{ item }}
|
|
|
|
register: kubelet_rkt_trust_result
|
|
|
|
until: kubelet_rkt_trust_result.rc == 0
|
|
|
|
with_items:
|
|
|
|
- "https://quay.io/aci-signing-key"
|
|
|
|
- "https://coreos.com/dist/pubkeys/aci-pubkeys.gpg"
|
|
|
|
retries: 4
|
|
|
|
delay: "{{ retry_stagger | random + 3 }}"
|
|
|
|
changed_when: false
|
|
|
|
when: kubelet_deployment_type == "rkt"
|
|
|
|
|
|
|
|
- name: create kubelet working directory
|
|
|
|
file:
|
|
|
|
state: directory
|
|
|
|
path: /var/lib/kubelet
|
|
|
|
when: kubelet_deployment_type == "rkt"
|
|
|
|
|
2017-02-09 05:41:36 +08:00
|
|
|
- name: install | Set SSL CA directories
|
|
|
|
set_fact:
|
|
|
|
ssl_ca_dirs: "[
|
|
|
|
{% if ansible_os_family in ['CoreOS', 'Container Linux by CoreOS'] -%}
|
|
|
|
'/usr/share/ca-certificates',
|
|
|
|
{% elif ansible_os_family == 'RedHat' -%}
|
|
|
|
'/etc/pki/tls',
|
|
|
|
'/etc/pki/ca-trust',
|
|
|
|
{% elif ansible_os_family == 'Debian' -%}
|
|
|
|
'/usr/share/ca-certificates',
|
|
|
|
{% endif -%}
|
|
|
|
]"
|
|
|
|
tags: facts
|
|
|
|
|
2017-02-10 19:50:26 +08:00
|
|
|
- name: install | Write kubelet systemd init file
|
|
|
|
template: "src=kubelet.{{ kubelet_deployment_type }}.service.j2 dest=/etc/systemd/system/kubelet.service backup=yes"
|
|
|
|
notify: restart kubelet
|
|
|
|
|
2016-07-08 17:59:21 +08:00
|
|
|
- name: install | Install kubelet launch script
|
2017-02-06 20:58:54 +08:00
|
|
|
template: src=kubelet-container.j2 dest="{{ bin_dir }}/kubelet" owner=kube mode=0755 backup=yes
|
2016-08-19 00:00:05 +08:00
|
|
|
notify: restart kubelet
|
2016-12-21 07:00:46 +08:00
|
|
|
when: kubelet_deployment_type == "docker"
|