main.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Copyright 2020 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: ../../common/vars/main.yml
  26. when: not cobbler_container_status
  27. - name: Internet validation
  28. include_tasks: ../../common/tasks/internet_validation.yml
  29. when: not cobbler_container_status
  30. - name: Provision password validation
  31. import_tasks: provision_password.yml
  32. when: not cobbler_image_status
  33. - name: Dhcp Configuration
  34. import_tasks: dhcp_configure.yml
  35. when: (not cobbler_image_status) or ( backup_map_status == true)
  36. - name: Mapping file validation
  37. import_tasks: mapping_file.yml
  38. when: (not cobbler_image_status) and (mapping_file == true) or ( backup_map_status == true)
  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. - name: Cobbler container status message
  45. block:
  46. - debug:
  47. msg: "{{ message_skipped }}"
  48. verbosity: 2
  49. when: cobbler_container_status
  50. - debug:
  51. msg: "{{ message_installed }}"
  52. verbosity: 2
  53. when: not cobbler_container_status
  54. tags: install