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 line
1.8 KiB

  1. ---
  2. - name: Fail if required mautrix-discord settings not defined
  3. ansible.builtin.fail:
  4. msg: >-
  5. You need to define a required configuration setting (`{{ item.name }}`).
  6. when: "item.when | bool and vars[item.name] == ''"
  7. with_items:
  8. - {'name': 'matrix_mautrix_discord_appservice_token', when: true}
  9. - {'name': 'matrix_mautrix_discord_homeserver_address', when: true}
  10. - {'name': 'matrix_mautrix_discord_homeserver_token', when: true}
  11. - {'name': 'matrix_mautrix_discord_bridge_public_address', when: true}
  12. - {'name': 'matrix_mautrix_discord_container_network', when: true}
  13. - {'name': 'matrix_mautrix_discord_database_hostname', when: "{{ matrix_mautrix_discord_database_engine == 'postgres' }}"}
  14. - {'name': 'matrix_mautrix_discord_container_labels_avatar_proxy_hostname', when: "{{ matrix_mautrix_discord_container_labels_avatar_proxy_enabled }}"}
  15. - {'name': 'matrix_mautrix_discord_container_labels_avatar_proxy_path_prefix', when: "{{ matrix_mautrix_discord_container_labels_avatar_proxy_enabled }}"}
  16. - name: (Deprecation) Catch and report renamed mautrix-discord settings
  17. ansible.builtin.fail:
  18. msg: >-
  19. Your configuration contains a variable, which now has a different name.
  20. Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
  21. when: "item.old in vars"
  22. with_items:
  23. - {'old': 'matrix_mautrix_discord_login_shared_secret', 'new': '<removed>'}
  24. - {'old': 'matrix_mautrix_discord_homeserver_public_address', 'new': 'matrix_mautrix_discord_bridge_public_address'}
  25. - {'old': 'matrix_mautrix_discord_command_prefix', 'new': 'matrix_mautrix_discord_bridge_command_prefix'}
  26. - {'old': 'matrix_mautrix_discord_docker_image_name_prefix', 'new': 'matrix_mautrix_discord_docker_image_registry_prefix'}