main.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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 AWX on the system
  16. - name: Check AWX status on machine
  17. include_tasks: check_awx_status.yml
  18. tags: install
  19. - name: Include common variables
  20. include_vars: ../../common/vars/main.yml
  21. tags: install
  22. - name: Internet validation
  23. include_tasks: ../../common/tasks/internet_validation.yml
  24. when: not awx_status
  25. tags: install
  26. - name: Clone AWX repo
  27. include_tasks: clone_awx.yml
  28. when: not awx_status
  29. tags: install
  30. - name: Modify firewall config
  31. include_tasks: firewall_settings.yml
  32. when: not awx_status
  33. tags: install
  34. - name: Install AWX
  35. include_tasks: install_awx.yml
  36. when: not awx_status
  37. tags: install
  38. - name: Status message
  39. block:
  40. - debug:
  41. msg: "{{ message_skipped }}"
  42. verbosity: 2
  43. when: awx_status
  44. - debug:
  45. msg: "{{ message_installed }}"
  46. verbosity: 2
  47. when: not awx_status
  48. tags: install
  49. - name: Internet validation
  50. include_tasks: ../../common/tasks/internet_validation.yml
  51. tags: install
  52. - name: Install AWX-CLI
  53. include_tasks: install_awx_cli.yml
  54. tags: install
  55. - name: Check if AWX-UI is accessible
  56. include_tasks: ui_accessibility.yml
  57. tags: install
  58. - name: Configure AWX
  59. block:
  60. - include_tasks: awx_configuration.yml
  61. rescue:
  62. - name: Display msg
  63. debug:
  64. msg: "{{ conf_fail_msg }}"
  65. tags: install