main.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. - block:
  16. - name: Update resolv.conf to edit mode
  17. command: chattr -i "{{ resolv_conf_path }}"
  18. changed_when: true
  19. - block:
  20. - name: Check freeipa installed or not
  21. include_tasks: check_prerequisites.yml
  22. - block:
  23. - name: Add ports of manager and login node to firewall
  24. include_tasks: firewall_settings.yml
  25. - name: Enable module idm
  26. include_tasks: enable_dnf_module.yml
  27. - name: Install required packages
  28. include_tasks: install_packages.yml
  29. - name: Install FreeIPA server
  30. include_tasks: install_ipa_server.yml
  31. when: not freeipa_status
  32. - name: FreeIPA configuration
  33. include_tasks: ipa_configuration.yml
  34. when: os_supported_leap not in mgmt_os
  35. - block:
  36. - name: Install 389 directory server
  37. include_tasks: install_389ds.yml
  38. - name: Install Apparmor on Leap
  39. include_tasks: install_apparmor.yml
  40. when: os_supported_leap in mgmt_os
  41. - name: Install snoopy
  42. include_tasks: install_snoopy.yml
  43. - name: Install psacct/acct
  44. include_tasks: user_monitor.yml
  45. - name: Alert configuration
  46. include_tasks: configure_alerting.yml
  47. when: alert_email_address | length > 1
  48. - name: Configure ssh access to login node
  49. include_tasks: configure_sshd.yml
  50. - name: Session timeout configuration
  51. include_tasks: session_timeout.yml
  52. - name: Restrict nonessential programs
  53. include_tasks: restrict_nonessentials.yml
  54. when: restrict_program_status
  55. - name: Update resolv.conf to read mode
  56. command: chattr +i "{{ resolv_conf_path }}"
  57. changed_when: true
  58. when: enable_security_support