Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

33 lines
2.0 KiB

  1. # SPDX-FileCopyrightText: 2020 Hugues Morisset
  2. # SPDX-FileCopyrightText: 2022 - 2025 Slavi Pantaleev
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. - name: (Deprecation) Catch and report renamed mx-puppet-steam variables
  7. ansible.builtin.fail:
  8. msg: >-
  9. The variable `{{ item.old }}` is deprecated. Please use `{{ item.new }}` instead.
  10. when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
  11. with_items:
  12. - {'old': 'matrix_mx_puppet_steam_docker_image_name_prefix', 'new': 'matrix_mx_puppet_steam_container_image_registry_prefix'}
  13. - {'old': 'matrix_mx_puppet_steam_docker_image', 'new': 'matrix_mx_puppet_steam_container_image'}
  14. - {'old': 'matrix_mx_puppet_steam_docker_image_force_pull', 'new': 'matrix_mx_puppet_steam_container_image_force_pull'}
  15. - {'old': 'matrix_mx_puppet_steam_docker_image_registry_prefix', 'new': 'matrix_mx_puppet_steam_container_image_registry_prefix'}
  16. - {'old': 'matrix_mx_puppet_steam_docker_image_registry_prefix_upstream', 'new': 'matrix_mx_puppet_steam_container_image_registry_prefix_upstream'}
  17. - {'old': 'matrix_mx_puppet_steam_docker_image_registry_prefix_upstream_default', 'new': 'matrix_mx_puppet_steam_container_image_registry_prefix_upstream_default'}
  18. - {'old': 'matrix_mx_puppet_steam_docker_src_files_path', 'new': 'matrix_mx_puppet_steam_container_src_files_path'}
  19. - name: Fail if required mx-puppet-steam settings not defined
  20. ansible.builtin.fail:
  21. msg: >-
  22. You need to define a required configuration setting (`{{ item.name }}`).
  23. when: "item.when | bool and lookup('vars', item.name, default='') | string | length == 0"
  24. with_items:
  25. - {'name': 'matrix_mx_puppet_steam_appservice_token', when: true}
  26. - {'name': 'matrix_mx_puppet_steam_homeserver_address', when: true}
  27. - {'name': 'matrix_mx_puppet_steam_homeserver_token', when: true}
  28. - {'name': 'matrix_mx_puppet_steam_database_hostname', when: "{{ matrix_mx_puppet_steam_database_engine == 'postgres' }}"}
  29. - {'name': 'matrix_mx_puppet_steam_container_network', when: true}