fetch_sm_inputs.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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: Check that the ib_vars.yml exists
  16. stat:
  17. path: "{{ ib_config_file }}"
  18. register: stat_result
  19. tags: install
  20. - name: Fail if config file doesn't exist
  21. fail:
  22. msg: "{{ fail_msg_config_file }}"
  23. when: not stat_result.stat.exists
  24. tags: install
  25. - name: Check that the opensm.conf exists
  26. stat:
  27. path: "{{ opensm_conf_file }}"
  28. register: stat_result
  29. tags: install
  30. - name: Fail if opensm.conf file doesn't exist
  31. fail:
  32. msg: "{{ fail_msg_opensm_config_file }}"
  33. when: not stat_result.stat.exists
  34. tags: install
  35. - name: Include infiniband variable file
  36. include_vars: "{{ ib_config_file }}"
  37. tags: install
  38. - name: Validate directory input definition
  39. fail:
  40. msg: "{{ fail_msg_ib_input_definition }}"
  41. when:
  42. - subnet_manager.cache_directory is not defined or subnet_manager.log_directory is not defined
  43. tags: install
  44. - name: Validate directory input
  45. fail:
  46. msg: "{{ fail_msg_ib_input }}"
  47. when:
  48. - subnet_manager.cache_directory |length < 1
  49. - subnet_manager.log_directory |length < 1
  50. tags: install