main.yml 2.1 KB

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