You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
1.0 KiB

  1. ---
  2. - name: kube-router | Add annotations on kube-master
  3. command: "{{bin_dir}}/kubectl annotate --overwrite node {{ ansible_hostname }} {{ item }}"
  4. with_items:
  5. - "{{ kube_router_annotations_master }}"
  6. delegate_to: "{{groups['kube-master'][0]}}"
  7. when: kube_router_annotations_master is defined and inventory_hostname in groups['kube-master']
  8. - name: kube-router | Add annotations on kube-node
  9. command: "{{bin_dir}}/kubectl annotate --overwrite node {{ ansible_hostname }} {{ item }}"
  10. with_items:
  11. - "{{ kube_router_annotations_node }}"
  12. delegate_to: "{{groups['kube-master'][0]}}"
  13. when: kube_router_annotations_node is defined and inventory_hostname in groups['kube-node']
  14. - name: kube-router | Add common annotations on all servers
  15. command: "{{bin_dir}}/kubectl annotate --overwrite node {{ ansible_hostname }} {{ item }}"
  16. with_items:
  17. - "{{ kube_router_annotations_all }}"
  18. delegate_to: "{{groups['kube-master'][0]}}"
  19. when: kube_router_annotations_all is defined and inventory_hostname in groups['all']