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.
 
 

27 lines
1.3 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: Fail if required mx-puppet-discord 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_mx_puppet_discord_appservice_token', when: true}
  13. - {'name': 'matrix_mx_puppet_discord_homeserver_address', when: true}
  14. - {'name': 'matrix_mx_puppet_discord_homeserver_token', when: true}
  15. - {'name': 'matrix_mx_puppet_discord_database_hostname', when: "{{ matrix_mx_puppet_discord_database_engine == 'postgres' }}"}
  16. - {'name': 'matrix_mx_puppet_discord_container_network', when: true}
  17. - name: (Deprecation) Catch and report renamed mx-puppet-discord variables
  18. ansible.builtin.fail:
  19. msg: >-
  20. The variable `{{ item.old }}` is deprecated. Please use `{{ item.new }}` instead.
  21. when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
  22. with_items:
  23. - {'old': 'matrix_mx_puppet_discord_docker_image_name_prefix', 'new': 'matrix_mx_puppet_discord_docker_image_registry_prefix'}