c12s-kubespray/roles/network_plugin/kube-router/tasks/annotate.yml
2018-10-21 00:35:52 -07:00

21 lines
No EOL
897 B
YAML

---
- name: kube-router | Add annotations on kube-master
command: "{{bin_dir}}/kubectl annotate --overwrite node {{ ansible_hostname }} {{ item }}"
with_items:
- "{{ kube_router_annotations_master }}"
delegate_to: "{{groups['kube-master'][0]}}"
when: kube_router_annotations_master is defined
- name: kube-router | Add annotations on kube-node
command: "{{bin_dir}}/kubectl annotate --overwrite node {{ ansible_hostname }} {{ item }}"
with_items:
- "{{ kube_router_annotations_node }}"
delegate_to: "{{groups['kube-master'][0]}}"
when: kube_router_annotations_node is defined
- name: kube-router | Add common annotations on all servers
command: "{{bin_dir}}/kubectl annotate --overwrite node {{ ansible_hostname }} {{ item }}"
with_items:
- "{{ kube_router_annotations_all }}"
delegate_to: "{{groups['kube-master'][0]}}"
when: kube_router_annotations_all is defined