nfs_volume.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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: Refresh ssh keys
  16. command: ssh-keygen -R {{ groups['powervault_me4'][0] }}
  17. changed_when: false
  18. tags: install
  19. failed_when: false
  20. - name: Validate authentication of username and password
  21. command: ping -c1 {{ groups['powervault_me4'][0] }}
  22. register: validate_login
  23. changed_when: false
  24. failed_when: false
  25. - name: Scan for getting the volume
  26. command: rescan-scsi-bus.sh --forcerescan
  27. changed_when: false
  28. register: volume_pv
  29. tags: install
  30. - name: Assert if volume created or not
  31. assert:
  32. that:
  33. - "' Model: ME4' in volume_pv.stdout"
  34. success_msg: "Volume is created"
  35. fail_msg: "Volume is not created properly."
  36. tags: install