main.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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_prerequisites.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: Get and encrypt AWX password
  27. include_tasks: awx_password.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: AWX configuration
  56. command: >-
  57. ansible-playbook "{{ role_path }}"/files/awx_configuration.yml
  58. -e @"{{ awx_installer_path + awx_password_file }}"
  59. --vault-password-file "{{ awx_installer_path + vault_file }}"
  60. tags: install