c12s-kubespray/roles/addons/tasks/main.yml
Smaine Kahlouch c26d2e17cd Addon Fabric8
2015-10-05 11:27:13 +02:00

48 lines
1 KiB
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
- include: fabric8.yml
when: enable_fabric8