main.yml 715 B

12345678910111213141516171819202122232425262728293031
  1. - name: init offline nodes list
  2. set_fact:
  3. offline_node_list: []
  4. - name: append offline_nodes
  5. set_fact:
  6. offline_node_list: "{{ offline_node_list + offline_nodes.split() }}"
  7. when:
  8. - offline_nodes is defined
  9. - name: offline_nodes type list
  10. set_fact:
  11. offline_node_list: "{{ offline_node_list + [node_ip] }}"
  12. when:
  13. - offline_data_path is defined
  14. - high_availability_vip is not defined
  15. - name: cp load-images.sh
  16. copy:
  17. mode: "0755"
  18. src: load-images.sh
  19. dest: /tmp/load-images.sh
  20. become: yes
  21. when:
  22. - offline_node_list | length > 0
  23. - name: loading images (this is slow, be patient)
  24. shell: bash /tmp/load-images.sh
  25. when:
  26. - offline_node_list | length > 0
  27. become: yes