46 lines
1,010 B
YAML
46 lines
1,010 B
YAML
|
---
|
||
|
- name: create manifests directory
|
||
|
file: path={{ kube_manifest_dir }} state=directory
|
||
|
|
||
|
- name: Write kube-system namespace manifest
|
||
|
copy:
|
||
|
src=kube-system.yaml
|
||
|
dest={{ kube_manifest_dir }}/kube-system.yaml
|
||
|
|
||
|
- name: Create kube-system namespace
|
||
|
kube:
|
||
|
resource: ns
|
||
|
name: kube-system
|
||
|
filename: "{{ kube_manifest_dir }}/kube-system.yaml"
|
||
|
state: present
|
||
|
tags:
|
||
|
- addons
|
||
|
ignore_errors: yes
|
||
|
|
||
|
- name: Run kube-gen-token script to create {{ kube_token_dir }}/known_tokens.csv
|
||
|
command: "{{ kube_script_dir }}/kube-gen-token.sh {{ item }}"
|
||
|
environment:
|
||
|
TOKEN_DIR: "{{ kube_token_dir }}"
|
||
|
with_items:
|
||
|
- "system:dns"
|
||
|
- "system:monitoring"
|
||
|
- "system:logging"
|
||
|
register: gentoken
|
||
|
changed_when: "'Added' in gentoken.stdout"
|
||
|
notify:
|
||
|
- restart apiserver
|
||
|
tags:
|
||
|
- addons
|
||
|
|
||
|
- include: skydns.yml
|
||
|
when: dns_setup
|
||
|
|
||
|
- include: kube-ui.yml
|
||
|
when: enable_ui
|
||
|
|
||
|
- include: logging.yml
|
||
|
when: enable_logging
|
||
|
|
||
|
- include: monitoring.yml
|
||
|
when: enable_monitoring
|