65-agent-ipi-multinode.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. ---
  2. # Configure the agent installation artifacts for multi-node PXE installation.
  3. - name: Prepare the files required for a multi-node installation using agent install.
  4. hosts: workstation.lab.example.com
  5. become: no
  6. gather_subset: min
  7. tasks:
  8. # NOTE: This one is actually a prep item, but it's only needed for agent installs.
  9. - name: Ensure nmstate is installed.
  10. become: yes
  11. ansible.builtin.yum:
  12. name: nmstate
  13. state: present
  14. - name: Check the dependency status.
  15. ansible.builtin.stat:
  16. path: "{{ ansible_facts['user_dir'] }}/{{ item }}"
  17. get_attributes: no
  18. get_checksum: no
  19. get_mime: no
  20. register: dependencies
  21. loop:
  22. - install-pull-secret
  23. - .ssh/openshift.pub
  24. - ca/ca-cert.pem
  25. - mirror/working-dir/cluster-resources/idms-oc-mirror.yaml
  26. - Downloads/rhcos-418.94.202501221327-0-live.x86_64.iso
  27. - ansible.builtin.assert:
  28. that:
  29. - dependencies.results[0].stat.exists
  30. - dependencies.results[1].stat.exists
  31. - dependencies.results[2].stat.exists
  32. - dependencies.results[3].stat.exists
  33. - dependencies.results[4].stat.exists
  34. fail_msg: |
  35. ERROR: Either pull secret, SSH keypair, CA certificate, RHCOS ISO, or mirror artifacts are missing.
  36. Ensure all the relevant preceding tasks have been completed:
  37. - Quay prerequisites,
  38. - Quay deployment,
  39. - oc-mirror prerequisites,
  40. - oc-mirror execution,
  41. - coreos-installer prerequisites
  42. Exiting.
  43. success_msg: "OK, dependencies exist."
  44. ...