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.
 
 

29 lines
1.5 KiB

  1. # SPDX-FileCopyrightText: 2022 - 2025 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2025 Suguru Hirahara
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. - name: Fail if required appservice-kakaotalk settings not defined
  7. ansible.builtin.fail:
  8. msg: >-
  9. You need to define a required configuration setting (`{{ item.name }}`).
  10. when: "item.when | bool and lookup('vars', item.name, default='') | string | length == 0"
  11. with_items:
  12. - {'name': 'matrix_appservice_kakaotalk_appservice_token', when: true}
  13. - {'name': 'matrix_appservice_kakaotalk_homeserver_address', when: true}
  14. - {'name': 'matrix_appservice_kakaotalk_homeserver_token', when: true}
  15. - {'name': 'matrix_appservice_kakaotalk_database_hostname', when: "{{ matrix_appservice_kakaotalk_database_engine == 'postgres' }}"}
  16. - {'name': 'matrix_appservice_kakaotalk_container_network', when: true}
  17. - name: (Deprecation) Catch and report renamed appservice-kakaotalk variables
  18. ansible.builtin.fail:
  19. msg: >-
  20. Your configuration contains a variable, which now has a different name.
  21. Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
  22. when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
  23. with_items:
  24. - {'old': 'matrix_appservice_kakaotalk_node_docker_image_name_prefix', 'new': 'matrix_appservice_kakaotalk_node_docker_image_registry_prefix'}
  25. - {'old': 'matrix_appservice_kakaotalk_docker_image_name_prefix', 'new': 'matrix_appservice_kakaotalk_docker_image_registry_prefix'}