main.yml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. #Tasks for Deploying cobbler on the system
  16. - name: Check cobbler status on machine
  17. include_tasks: check_prerequisites.yml
  18. - name: Multi profile creation
  19. import_tasks: multi_profile_creation.yml
  20. when: provision_os_change
  21. - name: Cobbler pod creation
  22. block:
  23. - name: Mount iso image
  24. import_tasks: mount_iso.yml
  25. when: not cobbler_image_status
  26. - name: Modify firewall settings for Cobbler
  27. import_tasks: firewall_settings.yml
  28. when: not cobbler_container_status
  29. - name: Include common variables
  30. include_vars: ../../control_plane_common/vars/main.yml
  31. when: not cobbler_container_status
  32. - name: Internet validation
  33. include_tasks: ../../control_plane_common/tasks/internet_validation.yml
  34. when: not cobbler_container_status
  35. - name: Dhcp Configuration
  36. import_tasks: dhcp_configure.yml
  37. when: (not cobbler_image_status) or ( backup_map_status )
  38. - name: Provision password validation
  39. import_tasks: provision_password.yml
  40. when: not cobbler_image_status
  41. - name: Mapping file validation
  42. import_tasks: mapping_file.yml
  43. when: (not cobbler_image_status) and (host_mapping_file) or ( backup_map_status)
  44. - name: Cobbler image creation
  45. import_tasks: cobbler_image.yml
  46. when: not cobbler_container_status
  47. - name: Cobbler configuration
  48. import_tasks: configure_cobbler.yml
  49. when: not cobbler_config_status
  50. - name: Cobbler container status message
  51. block:
  52. - name: cobbler container running
  53. debug:
  54. msg: "{{ message_skipped }}"
  55. verbosity: 2
  56. when: cobbler_container_status
  57. - name: cobbler container not running
  58. debug:
  59. msg: "{{ message_installed }}"
  60. verbosity: 2
  61. when: not cobbler_container_status
  62. tags: install
  63. when: not provision_os_change