label_and_wait.yaml 781 B

12345678910111213141516171819202122
  1. ---
  2. # This script is a special case because we need to pause between nodes while
  3. # labeling to avoid overloading the scheduler.
  4. # Also, looping over this task file (label_and_wait) causes memory to balloon
  5. # in some instances due to dynamic include bug in ansible, so we can't add the
  6. # wait in ansible directly.
  7. - name: Create temporary fluentd labeling script
  8. template:
  9. src: fluentd_label.sh.j2
  10. dest: /tmp/fluentd_label.temp.sh
  11. mode: "0744"
  12. - name: Execute the fluentd temporary labeling script
  13. command: "/tmp/fluentd_label.temp.sh {{ fluentd_host }}"
  14. with_items: "{{ openshift_logging_fluentd_hosts }}"
  15. loop_control:
  16. loop_var: fluentd_host
  17. - name: Remove temporary fluentd labeling script
  18. file:
  19. path: /tmp/fluentd_label.temp.sh
  20. state: absent