awx_logo.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. # Copyright 2022 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. - name: Convert logo to base64
  16. shell: >
  17. set -o pipefail && \
  18. echo -n "data:image/png;base64,$(cat {{ omnia_logo_path }} | base64 | tr -d '\r\n')" > {{ logo_txt_path }}
  19. changed_when: false
  20. - name: Fetch logo output
  21. command: cat {{ logo_txt_path }}
  22. register: logo_base64
  23. changed_when: false
  24. - name: Configure AWX logo to Omnia
  25. command: awx --conf.host http://{{ awx_cluster_ip.stdout }}:{{ awx_port }} --conf.username admin --conf.password {{ awx_admin_password.stdout }} settings modify CUSTOM_LOGO "{{ logo_base64.stdout }}"
  26. changed_when: false
  27. - name: Configure AWX login info
  28. command: awx --conf.host http://{{ awx_cluster_ip.stdout }}:{{ awx_port }} --conf.username admin --conf.password {{ awx_admin_password.stdout }} settings modify CUSTOM_LOGIN_INFO "{{ awx_login_info }}"
  29. changed_when: false