fetch_security_inputs.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Copyright 2022 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: Include security variable file security_vars.yml
  16. include_vars: "{{ security_vars_filename }}"
  17. - name: Validate max_failures
  18. assert:
  19. that:
  20. - max_failures | int == max_failures_default_value
  21. success_msg: "{{ max_failures_success_msg }}"
  22. fail_msg: "{{ max_failures_fail_msg }}"
  23. - name: Validate failure_reset_interval
  24. assert:
  25. that:
  26. - failure_reset_interval | int
  27. - failure_reset_interval | int <= failure_reset_interval_max_value
  28. - failure_reset_interval | int >= failure_reset_interval_min_value
  29. success_msg: "{{ failure_reset_interval_success_msg }}"
  30. fail_msg: "{{ failure_reset_interval_fail_msg }}"
  31. - name: Validate lockout_duration
  32. assert:
  33. that:
  34. - lockout_duration | int
  35. - lockout_duration | int <= lockout_duration_max_value
  36. - lockout_duration | int >= lockout_duration_min_value
  37. success_msg: "{{ lockout_duration_success_msg }}"
  38. fail_msg: "{{ lockout_duration_fail_msg }}"
  39. - name: Validate session_timeout
  40. assert:
  41. that:
  42. - session_timeout | int
  43. - session_timeout | int <= session_timeout_max_value
  44. - session_timeout | int >= session_timeout_min_value
  45. success_msg: "{{ session_timeout_success_msg }}"
  46. fail_msg: "{{ session_timeout_fail_msg }}"
  47. - name: Validate alert_email_address
  48. assert:
  49. that:
  50. - email_search_key in alert_email_address
  51. - alert_email_address | length < email_max_length
  52. success_msg: "{{ alert_email_success_msg }}"
  53. fail_msg: "{{ alert_email_fail_msg }}"
  54. when: alert_email_address | length > 1
  55. - name: Warning - alert_email_address is empty
  56. debug:
  57. msg: "{{ alert_email_warning_msg }}"
  58. when: alert_email_address | length < 1