validations.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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: Validate skip tags
  16. fail:
  17. msg: "{{ skip_tag_fail_msg }}"
  18. when: "'slurm' in ansible_skip_tags and 'kubernetes' in ansible_skip_tags"
  19. - name: Manager group to contain exactly 1 node
  20. assert:
  21. that: "groups['manager'] | length | int == 1"
  22. fail_msg: "{{ manager_group_fail_msg }}"
  23. success_msg: "{{ manager_group_success_msg }}"
  24. - name: Compute group to contain atleast 1 node
  25. assert:
  26. that: "groups['compute'] | length | int >= 1"
  27. fail_msg: "{{ compute_group_fail_msg }}"
  28. success_msg: "{{ compute_group_success_msg }}"
  29. - name: NFS group to contain exactly 1 node
  30. assert:
  31. that: "groups['nfs_node'] | length | int == 1"
  32. fail_msg: "{{ nfs_node_group_fail_msg }}"
  33. success_msg: "{{ nfs_node_group_success_msg }}"
  34. when: groups['nfs_node']