test_k8s_start_workers.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Copyright 2020 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. # OMNIA_UKP_US_VFKP_TC_013, OMNIA_UKP_US_VFKP_TC_014
  16. # Execute startworkers role in compute nodes with os installed centos 7.9 and swap enabled
  17. - name: OMNIA_UKP_US_VFKP_TC_013, OMNIA_UKP_US_VFKP_TC_014
  18. hosts: compute
  19. vars_files:
  20. - test_vars/test_k8s_start_workers_vars.yml
  21. tasks:
  22. - name: Enable Swap
  23. command: /usr/sbin/swapon -a
  24. changed_when: true
  25. tags: TC_013, TC_014
  26. - block:
  27. - name: Call k8s_start_workers role
  28. include_role:
  29. name: ../roles/k8s_start_workers.yml
  30. tags: TC_013, TC_014
  31. - name: OMNIA_UKP_US_VFKP_TC_013, OMNIA_UKP_US_VFKP_TC_014
  32. hosts: manager
  33. vars_files:
  34. - test_vars/test_k8s_start_workers_vars.yml
  35. tasks:
  36. - name: Check worker nodes status
  37. command: kubectl get node --selector='!node-role.kubernetes.io/master'
  38. register: worker_nodes_status
  39. tags: TC_013, TC_014, VERIFY_013
  40. - name: Validating worker nodes status
  41. assert:
  42. that:
  43. - "'Ready' in worker_nodes_status.stdout"
  44. fail_msg: "{{ worker_nodes_status_fail_msg }}"
  45. success_msg: "{{ worker_nodes_status_success_msg }}"
  46. tags: TC_013, TC_014, VERIFY_013