check_prerequisites.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright 2021 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 genisoimage package
  16. package:
  17. name: genisoimage
  18. state: present
  19. tags: install
  20. - name: Install ansible-galaxy modules
  21. command: ansible-galaxy collection install {{ item }}
  22. changed_when: true
  23. with_items:
  24. - community.general
  25. - dellemc.openmanage
  26. - name: Install omsdk using pip
  27. pip:
  28. name: omsdk
  29. state: present
  30. tags: install
  31. - name: Check iso mount folder
  32. stat:
  33. path: "{{ iso_mount_path }}{{ isolinux_cfg_path }}"
  34. register: check_mount_iso
  35. tags: install
  36. - name: Incorrect iso mount
  37. fail:
  38. msg: "{{ iso_mount_check_fail_msg }}"
  39. when: not check_mount_iso.stat.exists
  40. register: iso_mount_fail
  41. tags: install
  42. - name: Copy management station ip to {{ management_station_ip_file }}
  43. lineinfile:
  44. path: "{{ role_path }}/../provision_idrac/files/{{ management_station_ip_file }}"
  45. line: "{{ mngmnt_network_ip }}"
  46. mode: "{{ file_permission }}"
  47. create: yes