main.yml 2.6 KB

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