install_awx.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 installing AWX
  16. - name: Store omnia parent directory path
  17. set_fact:
  18. dir_path:
  19. tags: install
  20. - name: Change inventory file
  21. replace:
  22. path: "{{ awx_inventory_path }}"
  23. regexp: "{{ item.regexp }}"
  24. replace: "{{ item.replace }}"
  25. loop:
  26. - { name: Project data directory, regexp: "{{ project_data_dir_old }}" , replace: "{{ project_data_dir_new }}" }
  27. - { name: Alternate DNS Servers, regexp: "{{ awx_alternate_dns_servers_old }}", replace: "{{ awx_alternate_dns_servers_new }}" }
  28. - { name: Credentials, regexp: "{{ admin_password_old }}", replace: "{{ admin_password_new }}"}
  29. loop_control:
  30. label: "{{ item.name }}"
  31. tags: install
  32. - name: Create pgdocker directory
  33. file:
  34. path: "{{ pgdocker_dir_path }}"
  35. state: directory
  36. tags: install
  37. - name: Run AWX install.yml file
  38. command: ansible-playbook -i inventory install.yml -e @"{{ awx_password_file }}" --vault-password-file "{{ vault_file }}"
  39. args:
  40. chdir: "{{ awx_installer_path }}"
  41. tags: install