Fix (suppress) var-naming ansible-lint errors

Reference: https://ansible-lint.readthedocs.io/en/latest/default_rules/#var-naming

We don't really fix these, but just suppress them,
because they're like that intentionally.

We try to name variables in a way that is consistent with the
configuration key they control. If the upstream component uses
camelCase, we also need to include camelCase in the variable name.
This commit is contained in:
Slavi Pantaleev 2022-07-18 16:43:12 +03:00
parent 7831dc91b3
commit c73680712b
12 changed files with 44 additions and 43 deletions

View file

@ -7,7 +7,6 @@ skip_list:
- no-handler
- no-jinja-nesting
- schema
- var-naming
- command-instead-of-shell
- role-name

View file

@ -157,7 +157,7 @@ matrix_integration_manager_ui_url: ~
# The domain name where a Jitsi server is self-hosted.
# If set, `/.well-known/matrix/client` will suggest Element clients to use that Jitsi server.
# See: https://github.com/vector-im/element-web/blob/develop/docs/jitsi.md#configuring-element-to-use-your-self-hosted-jitsi-server
matrix_client_element_jitsi_preferredDomain: ''
matrix_client_element_jitsi_preferredDomain: '' # noqa var-naming
# Controls whether Element should use End-to-End Encryption by default.
# Setting this to false will update `/.well-known/matrix/client` and tell Element clients to avoid E2EE.

View file

@ -39,10 +39,10 @@ matrix_appservice_discord_appservice_url: 'http://matrix-appservice-discord:9005
matrix_appservice_discord_bridge_domain: "{{ matrix_domain }}"
# As of right now, the homeserver URL must be a public URL. See below.
matrix_appservice_discord_bridge_homeserverUrl: "{{ matrix_homeserver_url }}"
matrix_appservice_discord_bridge_disablePresence: false
matrix_appservice_discord_bridge_enableSelfServiceBridging: false
matrix_appservice_discord_bridge_disablePortalBridging: false
matrix_appservice_discord_bridge_homeserverUrl: "{{ matrix_homeserver_url }}" # noqa var-naming
matrix_appservice_discord_bridge_disablePresence: false # noqa var-naming
matrix_appservice_discord_bridge_enableSelfServiceBridging: false # noqa var-naming
matrix_appservice_discord_bridge_disablePortalBridging: false # noqa var-naming
# Database-related configuration fields.
#
@ -65,7 +65,7 @@ matrix_appservice_discord_database_name: 'matrix_appservice_discord'
# These 2 variables are what actually ends up in the bridge configuration.
# It's best if you don't change them directly, but rather redefine the sub-variables that constitute them.
matrix_appservice_discord_database_filename: "{{ matrix_appservice_discord_sqlite_database_path_in_container }}"
matrix_appservice_discord_database_connString: 'postgresql://{{ matrix_appservice_discord_database_username }}:{{ matrix_appservice_discord_database_password }}@{{ matrix_appservice_discord_database_hostname }}:{{ matrix_appservice_discord_database_port }}/{{ matrix_appservice_discord_database_name }}'
matrix_appservice_discord_database_connString: 'postgresql://{{ matrix_appservice_discord_database_username }}:{{ matrix_appservice_discord_database_password }}@{{ matrix_appservice_discord_database_hostname }}:{{ matrix_appservice_discord_database_port }}/{{ matrix_appservice_discord_database_name }}' # noqa var-naming
# Tells whether the bot should make use of "Privileged Gateway Intents".
@ -74,7 +74,7 @@ matrix_appservice_discord_database_connString: 'postgresql://{{ matrix_appservic
# by triggering all Intent checkboxes on a page like this: `https://discord.com/developers/applications/694448564151123988/bot`
#
# Learn more: https://gist.github.com/advaith1/e69bcc1cdd6d0087322734451f15aa2f
matrix_appservice_discord_auth_usePrivilegedIntents: false
matrix_appservice_discord_auth_usePrivilegedIntents: false # noqa var-naming
matrix_appservice_discord_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"

View file

@ -23,7 +23,7 @@ matrix_appservice_irc_data_path: "{{ matrix_appservice_irc_base_path }}/data"
matrix_appservice_irc_homeserver_url: "{{ matrix_homeserver_container_url }}"
matrix_appservice_irc_homeserver_media_url: 'https://{{ matrix_server_fqn_matrix }}'
matrix_appservice_irc_homeserver_domain: '{{ matrix_domain }}'
matrix_appservice_irc_homeserver_enablePresence: true
matrix_appservice_irc_homeserver_enablePresence: true # noqa var-naming
matrix_appservice_irc_appservice_address: 'http://matrix-appservice-irc:9999'
matrix_appservice_irc_database_engine: nedb
@ -38,14 +38,15 @@ matrix_appservice_irc_database_name: matrix_appservice_irc
matrix_appservice_irc_database_connection_string: 'postgresql://{{ matrix_appservice_irc_database_username }}:{{ matrix_appservice_irc_database_password }}@{{ matrix_appservice_irc_database_hostname }}:{{ matrix_appservice_irc_database_port }}/{{ matrix_appservice_irc_database_name }}?sslmode=disable'
# This is what actually goes into `database.connectionString` for the bridge.
matrix_appservice_irc_database_connectionString: "{{
{
'nedb': 'nedb:///data',
'postgres': matrix_appservice_irc_database_connection_string,
}[matrix_appservice_irc_database_engine]
}}"
matrix_appservice_irc_database_connectionString: |- # noqa var-naming
{{
{
'nedb': 'nedb:///data',
'postgres': matrix_appservice_irc_database_connection_string,
}[matrix_appservice_irc_database_engine]
}}
matrix_appservice_irc_ircService_servers: []
matrix_appservice_irc_ircService_servers: [] # noqa var-naming
# Example of `matrix_appservice_irc_ircService_servers` with one server (and all its options):
#

View file

@ -67,12 +67,13 @@ matrix_appservice_slack_database_name: matrix_appservice_slack
matrix_appservice_slack_database_connection_string: 'postgresql://{{ matrix_appservice_slack_database_username }}:{{ matrix_appservice_slack_database_password }}@{{ matrix_appservice_slack_database_hostname }}:{{ matrix_appservice_slack_database_port }}/{{ matrix_appservice_slack_database_name }}?sslmode=disable'
# This is what actually goes into `database.connectionString` for the bridge.
matrix_appservice_slack_database_connectionString: "{{
{
'nedb': 'nedb:///data',
'postgres': matrix_appservice_slack_database_connection_string,
}[matrix_appservice_slack_database_engine]
}}"
matrix_appservice_slack_database_connectionString: |- # noqa var-naming
{{
{
'nedb': 'nedb:///data',
'postgres': matrix_appservice_slack_database_connection_string,
}[matrix_appservice_slack_database_engine]
}}
matrix_appservice_slack_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"

View file

@ -72,7 +72,7 @@ matrix_hookshot_github_oauth_uri: "{{ matrix_hookshot_urlprefix }}{{ matrix_hook
# These are the default settings mentioned here and don't need to be modified: https://matrix-org.github.io/matrix-hookshot/usage/room_configuration/github_repo.html#configuration
matrix_hookshot_github_ignore_hooks: "{}"
matrix_hookshot_github_command_prefix: '!gh'
matrix_hookshot_github_showIssueRoomLink: false
matrix_hookshot_github_showIssueRoomLink: false # noqa var-naming
matrix_hookshot_github_pr_diff: "{enabled: false, maxLines: 5}"
matrix_hookshot_github_including_labels: ''
matrix_hookshot_github_excluding_labels: ''
@ -97,7 +97,7 @@ matrix_hookshot_gitlab_secret: ''
matrix_hookshot_figma_enabled: false
# Default value of matrix_hookshot_figma_endpoint: "/hookshot/webhooks/figma/webhook"
matrix_hookshot_figma_endpoint: "{{ matrix_hookshot_webhook_endpoint }}/figma/webhook"
matrix_hookshot_figma_publicUrl: "{{ matrix_hookshot_urlprefix }}{{ matrix_hookshot_figma_endpoint }}"
matrix_hookshot_figma_publicUrl: "{{ matrix_hookshot_urlprefix }}{{ matrix_hookshot_figma_endpoint }}" # noqa var-naming
# To bridge figma webhooks, you need to configure one of multiple instances like this:
# matrix_hookshot_figma_instances:
# your-instance:
@ -144,9 +144,9 @@ matrix_hookshot_provisioning_endpoint: "{{ matrix_hookshot_public_endpoint }}{{
matrix_hookshot_widgets_enabled: true
matrix_hookshot_widgets_port: 9003
matrix_hookshot_widgets_addToAdminRooms: false # default off as it is a beta feature
matrix_hookshot_widgets_roomSetupWidget_enabled: true
matrix_hookshot_widgets_roomSetupWidget_addOnInvite: false
matrix_hookshot_widgets_addToAdminRooms: false # default off as it is a beta feature # noqa var-naming
matrix_hookshot_widgets_roomSetupWidget_enabled: true # noqa var-naming
matrix_hookshot_widgets_roomSetupWidget_addOnInvite: false # noqa var-naming
# `disallowedIpRanges` describes which IP ranges should be disallowed when resolving homeserver IP addresses (for security reasons). Unless you know what you are doing, it is recommended to not include this key. The following IPs are blocked by default, unless you supply another list.
# matrix_hookshot_widgets_disallowedIpRanges:
# - 127.0.0.0/8
@ -168,12 +168,12 @@ matrix_hookshot_widgets_roomSetupWidget_addOnInvite: false
# - 2001:db8::/32
# - ff00::/8
# - fec0::/10
matrix_hookshot_widgets_disallowedIpRanges: ''
matrix_hookshot_widgets_disallowedIpRanges: '' # noqa var-naming
matrix_hookshot_widgets_internal: "/widgetapi"
# Default value of matrix_hookshot_widgets_endpoint: "/hookshot/widgetapi"
matrix_hookshot_widgets_endpoint: "{{ matrix_hookshot_public_endpoint }}{{ matrix_hookshot_widgets_internal }}"
matrix_hookshot_widgets_publicUrl: "{{ matrix_hookshot_urlprefix }}{{ matrix_hookshot_widgets_endpoint }}/v1/static"
matrix_hookshot_widgets_branding_widgetTitle: "Hookshot Configuration"
matrix_hookshot_widgets_publicUrl: "{{ matrix_hookshot_urlprefix }}{{ matrix_hookshot_widgets_endpoint }}/v1/static" # noqa var-naming
matrix_hookshot_widgets_branding_widgetTitle: "Hookshot Configuration" # noqa var-naming
# You can configure access to the bridge as documented here https://matrix-org.github.io/matrix-hookshot/setup.html#permissions

View file

@ -30,7 +30,7 @@ matrix_mx_puppet_discord_homeserver_address: "{{ matrix_homeserver_container_url
matrix_mx_puppet_discord_homeserver_domain: '{{ matrix_domain }}'
matrix_mx_puppet_discord_appservice_address: 'http://matrix-mx-puppet-discord:{{ matrix_mx_puppet_discord_appservice_port }}'
matrix_mx_puppet_discord_bridge_mediaUrl: "https://{{ matrix_server_fqn_matrix }}"
matrix_mx_puppet_discord_bridge_mediaUrl: "https://{{ matrix_server_fqn_matrix }}" # noqa var-naming
# "@user:server.com" to allow specific user
# "@.*:yourserver.com" to allow users on a specific homeserver

View file

@ -39,9 +39,9 @@ matrix_client_element_integrations_ui_url: "https://scalar.vector.im/"
matrix_client_element_integrations_rest_url: "https://scalar.vector.im/api"
matrix_client_element_integrations_widgets_urls: ["https://scalar.vector.im/api"]
matrix_client_element_integrations_jitsi_widget_url: "https://scalar.vector.im/api/widgets/jitsi.html"
matrix_client_element_permalinkPrefix: "https://matrix.to"
matrix_client_element_permalinkPrefix: "https://matrix.to" # noqa var-naming
matrix_client_element_bug_report_endpoint_url: "https://element.io/bugreports/submit"
matrix_client_element_showLabsSettings: true
matrix_client_element_showLabsSettings: true # noqa var-naming
# Element public room directory server(s)
matrix_client_element_roomdir_servers: ['matrix.org']
matrix_client_element_welcome_user_id: ~
@ -59,13 +59,13 @@ matrix_client_element_welcome_text: "_t('Decentralised, encrypted chat & col
# Links, shown in footer of welcome page:
# [{"text": "Link text", "url": "https://link.target"}, {"text": "Other link"}]
matrix_client_element_branding_authFooterLinks: ~
matrix_client_element_branding_authFooterLinks: ~ # noqa var-naming
# URL to image, shown during Login
matrix_client_element_branding_authHeaderLogoUrl: "{{ matrix_client_element_welcome_logo }}"
matrix_client_element_branding_authHeaderLogoUrl: "{{ matrix_client_element_welcome_logo }}" # noqa var-naming
# URL to Wallpaper, shown in background of welcome page
matrix_client_element_branding_welcomeBackgroundUrl: ~
matrix_client_element_branding_welcomeBackgroundUrl: ~ # noqa var-naming
matrix_client_element_page_template_welcome_path: "{{ role_path }}/templates/welcome.html.j2"
@ -73,7 +73,7 @@ matrix_client_element_page_template_welcome_path: "{{ role_path }}/templates/wel
# point this to a `home.html` template file on your local filesystem.
matrix_client_element_embedded_pages_home_path: ~
matrix_client_element_jitsi_preferredDomain: ''
matrix_client_element_jitsi_preferredDomain: '' # noqa var-naming
# Controls whether the self-check feature should validate SSL certificates.
matrix_client_element_self_check_validate_certificates: true
@ -101,7 +101,7 @@ matrix_client_element_default_theme: 'light'
# If you define your own themes here and set `matrix_client_element_themes_enabled: true`, your themes will be preserved as well.
#
# Note that for a custom theme to work well, all Element instances that you use must have the same theme installed.
matrix_client_element_settingDefaults_custom_themes: []
matrix_client_element_settingDefaults_custom_themes: [] # noqa var-naming
# Default Element configuration template which covers the generic use case.
# You can customize it by controlling the various variables inside it.

View file

@ -26,7 +26,7 @@
- name: Load Element theme
ansible.builtin.set_fact:
matrix_client_element_settingDefaults_custom_themes: "{{ matrix_client_element_settingDefaults_custom_themes + [item['content'] | b64decode | from_json] }}"
matrix_client_element_settingDefaults_custom_themes: "{{ matrix_client_element_settingDefaults_custom_themes + [item['content'] | b64decode | from_json] }}" # noqa var-naming
with_items: "{{ matrix_client_element_theme_file_contents.results }}"
run_once: true

View file

@ -48,7 +48,7 @@ matrix_dimension_integrations_rest_url: "https://{{ matrix_server_fqn_dimension
matrix_dimension_integrations_widgets_urls: ["https://{{ matrix_server_fqn_dimension }}/widgets"]
matrix_dimension_integrations_jitsi_widget_url: "https://{{ matrix_server_fqn_dimension }}/widgets/jitsi"
matrix_dimension_homeserver_federationUrl: ""
matrix_dimension_homeserver_federationUrl: "" # noqa var-naming
# Database-related configuration fields.

View file

@ -132,7 +132,7 @@ matrix_jitsi_web_config_start_audio_muted_after_nth_participant: ~
# Controls after which participant video will be muted. If not specified, defaults to Jitsi's default value (likely 10)
matrix_jitsi_web_config_start_video_muted_after_nth_participant: ~
matrix_jitsi_web_config_defaultLanguage: 'en'
matrix_jitsi_web_config_defaultLanguage: 'en' # noqa var-naming
# Ideal and also maximum resolution width. If not specified, defaults to Jitsi's default value (likely 1280)
matrix_jitsi_web_config_resolution_width_ideal_and_max: ~

View file

@ -93,9 +93,9 @@ matrix_ma1sd_dns_overwrite_homeserver_client_value: ""
# https://github.com/ma1uta/ma1sd/blob/master/docs/threepids/session/session-views.md
matrix_ma1sd_view_session_custom_templates_enabled: false
# Defaults to: https://github.com/ma1uta/ma1sd/blob/master/src/main/resources/templates/session/tokenSubmitSuccess.html
matrix_ma1sd_view_session_custom_onTokenSubmit_success_template: ""
matrix_ma1sd_view_session_custom_onTokenSubmit_success_template: "" # noqa var-naming
# Defaults to: https://github.com/ma1uta/ma1sd/blob/master/src/main/resources/templates/session/tokenSubmitFailure.html
matrix_ma1sd_view_session_custom_onTokenSubmit_failure_template: ""
matrix_ma1sd_view_session_custom_onTokenSubmit_failure_template: "" # noqa var-naming
# Override the default email templates
# To use this, fill in the template variables with the full desired template as a multi-line YAML variable