check_prerequisites.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. ---
  15. - name: Install xorriso package - rocky
  16. package:
  17. name: xorriso
  18. state: present
  19. tags: install
  20. when:
  21. - ansible_distribution | lower == os_supported_centos or
  22. ansible_distribution | lower == os_supported_rocky
  23. - name: Install xorriso package - leap
  24. zypper:
  25. name: xorriso
  26. state: present
  27. tags: install
  28. when: os_supported_leap in ansible_distribution | lower
  29. - name: Install ansible-galaxy modules
  30. command: ansible-galaxy collection install {{ item }}
  31. changed_when: true
  32. tags: install
  33. with_items:
  34. - community.general
  35. - dellemc.openmanage
  36. - name: Install omsdk using pip
  37. pip:
  38. name: omsdk
  39. state: present
  40. tags: install
  41. - name: Check iso mount folder
  42. stat:
  43. path: "{{ iso_mount_path }}{{ grub_cfg_path }}"
  44. register: check_mount_iso
  45. tags: install
  46. - name: Incorrect iso mount
  47. fail:
  48. msg: "{{ iso_mount_check_fail_msg }}"
  49. when: not check_mount_iso.stat.exists
  50. register: iso_mount_fail
  51. tags: install
  52. - name: Copy management station ip to {{ management_station_ip_file }}
  53. lineinfile:
  54. path: "{{ role_path }}/../provision_idrac/files/{{ management_station_ip_file }}"
  55. line: "{{ mngmnt_network_ip }}"
  56. mode: "{{ file_permission }}"
  57. create: yes
  58. tags: install