Matrix Docker Ansible eploy
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

424 lines
22 KiB

  1. ---
  2. # Matrix Appservice IRC is a Matrix <-> IRC bridge
  3. # Project source code URL: https://github.com/matrix-org/matrix-appservice-irc
  4. matrix_appservice_irc_enabled: true
  5. matrix_appservice_irc_container_image_self_build: false
  6. matrix_appservice_irc_docker_repo: "https://github.com/matrix-org/matrix-appservice-irc.git"
  7. matrix_appservice_irc_docker_repo_version: "{{ 'master' if matrix_appservice_irc_version == 'latest' else matrix_appservice_irc_version }}"
  8. matrix_appservice_irc_docker_src_files_path: "{{ matrix_base_data_path }}/appservice-irc/docker-src"
  9. # matrix_appservice_irc_version used to contain the full Docker image tag (e.g. `release-X.X.X`).
  10. # It's a bare version number now. We try to somewhat retain compatibility below.
  11. # renovate: datasource=docker depName=docker.io/matrixdotorg/matrix-appservice-irc
  12. matrix_appservice_irc_version: 1.0.1
  13. matrix_appservice_irc_docker_image: "{{ matrix_container_global_registry_prefix }}matrixdotorg/matrix-appservice-irc:{{ matrix_appservice_irc_docker_image_tag }}"
  14. matrix_appservice_irc_docker_image_tag: "{{ 'latest' if matrix_appservice_irc_version == 'latest' else ('release-' + matrix_appservice_irc_version) }}"
  15. matrix_appservice_irc_docker_image_force_pull: "{{ matrix_appservice_irc_docker_image.endswith(':latest') }}"
  16. matrix_appservice_irc_docker_image_name_prefix: "{{ 'localhost/' if matrix_appservice_irc_container_image_self_build else matrix_container_global_registry_prefix }}"
  17. matrix_appservice_irc_base_path: "{{ matrix_base_data_path }}/appservice-irc"
  18. matrix_appservice_irc_config_path: "{{ matrix_appservice_irc_base_path }}/config"
  19. matrix_appservice_irc_data_path: "{{ matrix_appservice_irc_base_path }}/data"
  20. matrix_appservice_irc_homeserver_url: ""
  21. matrix_appservice_irc_homeserver_media_url: '{{ matrix_homeserver_url }}'
  22. matrix_appservice_irc_homeserver_domain: '{{ matrix_domain }}'
  23. matrix_appservice_irc_homeserver_enablePresence: true # noqa var-naming
  24. matrix_appservice_irc_appservice_address: 'http://matrix-appservice-irc:9999'
  25. matrix_appservice_irc_database_engine: nedb
  26. matrix_appservice_irc_database_username: matrix_appservice_irc
  27. matrix_appservice_irc_database_password: 'some-password'
  28. matrix_appservice_irc_database_hostname: ''
  29. matrix_appservice_irc_database_port: 5432
  30. matrix_appservice_irc_database_name: matrix_appservice_irc
  31. matrix_appservice_irc_database_sslmode: disable
  32. # The name of the container network to use when importing a NeDB database into Postgres.
  33. # For Postgres not working in a container, this can be left empty.
  34. matrix_appservice_irc_database_container_network: ''
  35. # This is just the Postgres connection string, if Postgres is used.
  36. # Naming clashes with `matrix_appservice_irc_database_connectionString` somewhat.
  37. 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={{ matrix_appservice_irc_database_sslmode }}'
  38. # This is what actually goes into `database.connectionString` for the bridge.
  39. matrix_appservice_irc_database_connectionString: |- # noqa var-naming
  40. {{
  41. {
  42. 'nedb': 'nedb:///data',
  43. 'postgres': matrix_appservice_irc_database_connection_string,
  44. }[matrix_appservice_irc_database_engine]
  45. }}
  46. matrix_appservice_irc_ircService_servers: [] # noqa var-naming
  47. # Example of `matrix_appservice_irc_ircService_servers` with one server (and all its options):
  48. #
  49. # matrix_appservice_irc_ircService_servers:
  50. # # The address of the server to connect to.
  51. # irc.example.com:
  52. # # A human-readable short name. This is used to label IRC status rooms
  53. # # where Matrix users control their connections.
  54. # # E.g. 'ExampleNet IRC Bridge status'.
  55. # # It is also used in the Third Party Lookup API as the instance `desc`
  56. # # property, where each server is an instance.
  57. # name: "ExampleNet"
  58. # additionalAddresses: [ "irc2.example.com" ]
  59. # #
  60. # # [DEPRECATED] Use `name`, above, instead.
  61. # # A human-readable description string
  62. # # description: "Example.com IRC network"
  63. # # An ID for uniquely identifying this server amongst other servers being bridged.
  64. # # networkId: "example"
  65. # # URL to an icon used as the network icon whenever this network appear in
  66. # # a network list. (Like in the riot room directory, for instance.)
  67. # # icon: https://example.com/images/hash.png
  68. # # The port to connect to. Optional.
  69. # port: 6697
  70. # # Whether to use SSL or not. Default: false.
  71. # ssl: true
  72. # # Whether or not IRC server is using a self-signed cert or not providing CA Chain
  73. # sslselfsign: false
  74. # # Should the connection attempt to identify via SASL (if a server or user password is given)
  75. # # If false, this will use PASS instead. If SASL fails, we do not fallback to PASS.
  76. # sasl: false
  77. # # Whether to allow expired certs when connecting to the IRC server.
  78. # # Usually this should be off. Default: false.
  79. # allowExpiredCerts: false
  80. # # A specific CA to trust instead of the default CAs. Optional.
  81. # #ca: |
  82. # # -----BEGIN CERTIFICATE-----
  83. # # ...
  84. # # -----END CERTIFICATE-----
  85. # #
  86. # # The connection password to send for all clients as a PASS (or SASL, if enabled above) command. Optional.
  87. # # password: 'pa$$w0rd'
  88. # #
  89. # # Whether or not to send connection/error notices to real Matrix users. Default: true.
  90. # sendConnectionMessages: true
  91. # quitDebounce:
  92. # # Whether parts due to net-splits are debounced for delayMs, to allow
  93. # # time for the netsplit to resolve itself. A netsplit is detected as being
  94. # # a QUIT rate higher than quitsPerSecond. Default: false.
  95. # enabled: false
  96. # # The maximum number of quits per second acceptable above which a netsplit is
  97. # # considered ongoing. Default: 5.
  98. # quitsPerSecond: 5
  99. # # The time window in which to wait before bridging a QUIT to Matrix that occurred during
  100. # # a netsplit. Debouncing is jittered randomly between delayMinMs and delayMaxMs so that the HS
  101. # # is not sent many requests to leave rooms all at once if a netsplit occurs and many
  102. # # people to not rejoin.
  103. # # If the user with the same IRC nick as the one who sent the quit rejoins a channel
  104. # # they are considered back online and the quit is not bridged, so long as the rejoin
  105. # # occurs before the randomly-jittered timeout is not reached.
  106. # # Default: 3600000, = 1h
  107. # delayMinMs: 3600000 # 1h
  108. # # Default: 7200000, = 2h
  109. # delayMaxMs: 7200000 # 2h
  110. # # A map for conversion of IRC user modes to Matrix power levels. This enables bridging
  111. # # of IRC ops to Matrix power levels only, it does not enable the reverse. If a user has
  112. # # been given multiple modes, the one that maps to the highest power level will be used.
  113. # modePowerMap:
  114. # o: 50
  115. # botConfig:
  116. # # Enable the presence of the bot in IRC channels. The bot serves as the entity
  117. # # which maps from IRC -> Matrix. You can disable the bot entirely which
  118. # # means IRC -> Matrix chat will be shared by active "M-Nick" connections
  119. # # in the room. If there are no users in the room (or if there are users
  120. # # but their connections are not on IRC) then nothing will be bridged to
  121. # # Matrix. If you're concerned about the bot being treated as a "logger"
  122. # # entity, then you may want to disable the bot. If you want IRC->Matrix
  123. # # but don't want to have TCP connections to IRC unless a Matrix user speaks
  124. # # (because your client connection limit is low), then you may want to keep
  125. # # the bot enabled. Default: true.
  126. # # NB: If the bot is disabled, you SHOULD have matrix-to-IRC syncing turned
  127. # # on, else there will be no users and no bot in a channel (meaning no
  128. # # messages to Matrix!) until a Matrix user speaks which makes a client
  129. # # join the target IRC channel.
  130. # # NBB: The bridge bot IRC client will still join the target IRC network so
  131. # # it can service bridge-specific queries from the IRC-side e.g. so
  132. # # real IRC clients have a way to change their Matrix display name.
  133. # # See https://github.com/matrix-org/matrix-appservice-irc/issues/55
  134. # enabled: true
  135. # # The nickname to give the AS bot.
  136. # nick: "MatrixBot"
  137. # # The password to give to NickServ or IRC Server for this nick. Optional.
  138. # # password: "helloworld"
  139. # #
  140. # # Join channels even if there are no Matrix users on the other side of
  141. # # the bridge. Set to false to prevent the bot from joining channels which have no
  142. # # real Matrix users in them, even if there is a mapping for the channel.
  143. # # Default: true
  144. # joinChannelsIfNoUsers: true
  145. # # Configuration for PMs / private 1:1 communications between users.
  146. # privateMessages:
  147. # # Enable the ability for PMs to be sent to/from IRC/Matrix.
  148. # # Default: true.
  149. # enabled: true
  150. # # Prevent Matrix users from sending PMs to the following IRC nicks.
  151. # # Optional. Default: [].
  152. # # exclude: ["Alice", "Bob"] # NOT YET IMPLEMENTED
  153. # # Should created Matrix PM rooms be federated? If false, only users on the
  154. # # HS attached to this AS will be able to interact with this room.
  155. # # Optional. Default: true.
  156. # federate: true
  157. # # Configuration for mappings not explicitly listed in the 'mappings'
  158. # # section.
  159. # dynamicChannels:
  160. # # Enable the ability for Matrix users to join *any* channel on this IRC
  161. # # network.
  162. # # Default: false.
  163. # enabled: true
  164. # # Should the AS create a room alias for the new Matrix room? The form of
  165. # # the alias can be modified via 'aliasTemplate'. Default: true.
  166. # createAlias: true
  167. # # Should the AS publish the new Matrix room to the public room list so
  168. # # anyone can see it? Default: true.
  169. # published: true
  170. # # What should the join_rule be for the new Matrix room? If 'public',
  171. # # anyone can join the room. If 'invite', only users with an invite can
  172. # # join the room. Note that if an IRC channel has +k or +i set on it,
  173. # # join_rules will be set to 'invite' until these modes are removed.
  174. # # Default: "public".
  175. # joinRule: public
  176. # # This will set the m.room.related_groups state event in newly created rooms
  177. # # with the given groupId. This means flares will show up on IRC users in those rooms.
  178. # # This should be set to the same thing as namespaces.users.group_id in irc_registration.
  179. # # This does not alter existing rooms.
  180. # # Leaving this option empty will not set the event.
  181. # groupId: +myircnetwork:localhost
  182. # # Should created Matrix rooms be federated? If false, only users on the
  183. # # HS attached to this AS will be able to interact with this room.
  184. # # Default: true.
  185. # federate: true
  186. # # The room alias template to apply when creating new aliases. This only
  187. # # applies if createAlias is 'true'. The following variables are exposed:
  188. # # $SERVER => The IRC server address (e.g. "irc.example.com")
  189. # # $CHANNEL => The IRC channel (e.g. "#python")
  190. # # This MUST have $CHANNEL somewhere in it.
  191. # # Default: '#irc_$SERVER_$CHANNEL'
  192. # aliasTemplate: "#irc_$CHANNEL"
  193. # # A list of user IDs which the AS bot will send invites to in response
  194. # # to a !join. Only applies if joinRule is 'invite'. Default: []
  195. # # whitelist:
  196. # # - "@foo:example.com"
  197. # # - "@bar:example.com"
  198. # #
  199. # # Prevent the given list of channels from being mapped under any
  200. # # circumstances.
  201. # # exclude: ["#foo", "#bar"]
  202. # # Configuration for controlling how Matrix and IRC membership lists are
  203. # # synced.
  204. # membershipLists:
  205. # # Enable the syncing of membership lists between IRC and Matrix. This
  206. # # can have a significant effect on performance on startup as the lists are
  207. # # synced. This must be enabled for anything else in this section to take
  208. # # effect. Default: false.
  209. # enabled: false
  210. # # Syncing membership lists at startup can result in hundreds of members to
  211. # # process all at once. This timer drip feeds membership entries at the
  212. # # specified rate. Default: 10000. (10s)
  213. # floodDelayMs: 10000
  214. # global:
  215. # ircToMatrix:
  216. # # Get a snapshot of all real IRC users on a channel (via NAMES) and
  217. # # join their virtual Matrix clients to the room.
  218. # initial: false
  219. # # Make virtual Matrix clients join and leave rooms as their real IRC
  220. # # counterparts join/part channels. Default: false.
  221. # incremental: false
  222. # matrixToIrc:
  223. # # Get a snapshot of all real Matrix users in the room and join all of
  224. # # them to the mapped IRC channel on startup. Default: false.
  225. # initial: false
  226. # # Make virtual IRC clients join and leave channels as their real Matrix
  227. # # counterparts join/leave rooms. Make sure your 'maxClients' value is
  228. # # high enough! Default: false.
  229. # incremental: false
  230. # # Apply specific rules to Matrix rooms. Only matrix-to-IRC takes effect.
  231. # rooms:
  232. # - room: "!someRoom:localhost"
  233. # matrixToIrc:
  234. # initial: false
  235. # incremental: false
  236. # # Apply specific rules to IRC channels. Only IRC-to-matrix takes effect.
  237. # channels:
  238. # - channel: "#foo"
  239. # ircToMatrix:
  240. # initial: false
  241. # incremental: false
  242. # mappings:
  243. # # 1:many mappings from IRC channels to room IDs on this IRC server.
  244. # # The Matrix room must already exist. Your Matrix client should expose
  245. # # the room ID in a "settings" page for the room.
  246. # "#thepub":
  247. # roomIds: ["!someRoom:localhost"]
  248. # # Channel key/password to use. Optional. If provided, Matrix users do
  249. # # not need to know the channel key in order to join the channel.
  250. # # key: "secret"
  251. # # Configuration for virtual Matrix users. The following variables are
  252. # # exposed:
  253. # # $NICK => The IRC nick
  254. # # $SERVER => The IRC server address (e.g. "irc.example.com")
  255. # matrixClients:
  256. # # The user ID template to use when creating virtual Matrix users. This
  257. # # MUST have $NICK somewhere in it.
  258. # # Optional. Default: "@$SERVER_$NICK".
  259. # # Example: "@irc.example.com_Alice:example.com"
  260. # userTemplate: "@irc_$NICK"
  261. # # The display name to use for created Matrix clients. This should have
  262. # # $NICK somewhere in it if it is specified. Can also use $SERVER to
  263. # # insert the IRC domain.
  264. # # Optional. Default: "$NICK (IRC)". Example: "Alice (IRC)"
  265. # displayName: "$NICK (IRC)"
  266. # # Number of tries a client can attempt to join a room before the request
  267. # # is discarded. You can also use -1 to never retry or 0 to never give up.
  268. # # Optional. Default: -1
  269. # joinAttempts: -1
  270. # # Configuration for virtual IRC users. The following variables are exposed:
  271. # # $LOCALPART => The user ID localpart ("alice" in @alice:localhost)
  272. # # $USERID => The user ID
  273. # # $DISPLAY => The display name of this user, with excluded characters
  274. # # (e.g. space) removed. If the user has no display name, this
  275. # # falls back to $LOCALPART.
  276. # ircClients:
  277. # # The template to apply to every IRC client nick. This MUST have either
  278. # # $DISPLAY or $USERID or $LOCALPART somewhere in it.
  279. # # Optional. Default: "M-$DISPLAY". Example: "M-Alice".
  280. # nickTemplate: "$DISPLAY[m]"
  281. # # True to allow virtual IRC clients to change their nick on this server
  282. # # by issuing !nick <server> <nick> commands to the IRC AS bot.
  283. # # This is completely freeform: it will NOT follow the nickTemplate.
  284. # allowNickChanges: true
  285. # # The max number of IRC clients that will connect. If the limit is
  286. # # reached, the client that spoke the longest time ago will be
  287. # # disconnected and replaced.
  288. # # Optional. Default: 30.
  289. # maxClients: 30
  290. # # IPv6 configuration.
  291. # ipv6:
  292. # # Optional. Set to true to force IPv6 for outgoing connections.
  293. # only: false
  294. # # Optional. The IPv6 prefix to use for generating unique addresses for each
  295. # # connected user. If not specified, all users will connect from the same
  296. # # (default) address. This may require additional OS-specific work to allow
  297. # # for the node process to bind to multiple different source addresses
  298. # # e.g IP_FREEBIND on Linux, which requires an LD_PRELOAD with the library
  299. # # https://github.com/matrix-org/freebindfree as Node does not expose setsockopt.
  300. # # prefix: "2001:0db8:85a3::" # modify appropriately
  301. # #
  302. # # The maximum amount of time in seconds that the client can exist
  303. # # without sending another message before being disconnected. Use 0 to
  304. # # not apply an idle timeout. This value is ignored if this IRC server is
  305. # # mirroring Matrix membership lists to IRC. Default: 172800 (48 hours)
  306. # idleTimeout: 10800
  307. # # The number of millseconds to wait between consecutive reconnections if a
  308. # # client gets disconnected. Setting to 0 will cause the scheduling to be
  309. # # disabled, i.e. it will be scheduled immediately (with jitter.
  310. # # Otherwise, the scheduling interval will be used such that one client
  311. # # reconnect for this server will be handled every reconnectIntervalMs ms using
  312. # # a FIFO queue.
  313. # # Default: 5000 (5 seconds)
  314. # reconnectIntervalMs: 5000
  315. # # The number of concurrent reconnects if a user has been disconnected unexpectedly
  316. # # (e.g. a netsplit). You should set this to a reasonably high number so that
  317. # # bridges are not waiting an eternity to reconnect all its clients if
  318. # # we see a massive number of disconnect. This is unrelated to the reconnectIntervalMs
  319. # # setting above which is for connecting on restart of the bridge. Set to 0 to
  320. # # immediately try to reconnect all users.
  321. # # Default: 50
  322. # concurrentReconnectLimit: 50
  323. # # The number of lines to allow being sent by the IRC client that has received
  324. # # a large block of text to send from matrix. If the number of lines that would
  325. # # be sent is > lineLimit, the text will instead be uploaded to Matrix and the
  326. # # resulting URI is treated as a file. As such, a link will be sent to the IRC
  327. # # side instead of potentially spamming IRC and getting the IRC client kicked.
  328. # # Default: 3.
  329. # lineLimit: 3
  330. # # A list of user modes to set on every IRC client. For example, "RiG" would set
  331. # # +R, +i and +G on every IRC connection when they have successfully connected.
  332. # # User modes vary wildly depending on the IRC network you're connecting to,
  333. # # so check before setting this value. Some modes may not work as intended
  334. # # through the bridge e.g. caller ID as there is no way to /ACCEPT.
  335. # # Default: "" (no user modes)
  336. # # userModes: "R"
  337. # Controls whether the matrix-appservice-discord container exposes its HTTP port (tcp/9999 in the container).
  338. #
  339. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:9999"), or empty string to not expose.
  340. matrix_appservice_irc_container_http_host_bind_port: ''
  341. matrix_appservice_irc_container_network: ""
  342. matrix_appservice_irc_container_additional_networks: "{{ matrix_appservice_irc_container_additional_networks_auto + matrix_appservice_irc_container_additional_networks_custom }}"
  343. matrix_appservice_irc_container_additional_networks_auto: []
  344. matrix_appservice_irc_container_additional_networks_custom: []
  345. # A list of extra arguments to pass to the container
  346. matrix_appservice_irc_container_extra_arguments: []
  347. # List of systemd services that matrix-appservice-irc.service depends on.
  348. matrix_appservice_irc_systemd_required_services_list: "{{ matrix_appservice_irc_systemd_required_services_list_default + matrix_appservice_irc_systemd_required_services_list_auto + matrix_appservice_irc_systemd_required_services_list_custom }}"
  349. matrix_appservice_irc_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  350. matrix_appservice_irc_systemd_required_services_list_auto: []
  351. matrix_appservice_irc_systemd_required_services_list_custom: []
  352. # List of systemd services that matrix-appservice-irc.service wants
  353. matrix_appservice_irc_systemd_wanted_services_list: []
  354. matrix_appservice_irc_appservice_token: ''
  355. matrix_appservice_irc_homeserver_token: ''
  356. matrix_appservice_irc_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  357. matrix_appservice_irc_configuration_extension_yaml: |
  358. # Your custom YAML configuration for Appservice IRC servers goes here.
  359. # This configuration extends the default starting configuration (`matrix_appservice_irc_configuration_yaml`).
  360. #
  361. # You can override individual variables from the default configuration, or introduce new ones.
  362. #
  363. # If you need something more special, you can take full control by
  364. # completely redefining `matrix_appservice_irc_configuration_yaml`.
  365. matrix_appservice_irc_configuration_extension: "{{ matrix_appservice_irc_configuration_extension_yaml | from_yaml if matrix_appservice_irc_configuration_extension_yaml | from_yaml is mapping else {} }}"
  366. matrix_appservice_irc_configuration: "{{ matrix_appservice_irc_configuration_yaml | from_yaml | combine(matrix_appservice_irc_configuration_extension, recursive=True) }}"
  367. # The original registration.yaml file generated by AppService IRC is merged with this config override,
  368. # to produce the final registration.yaml file ultimately used by both the bridge and the homeserver.
  369. #
  370. # We do this to ensure consistency:
  371. # - always having an up-to-date registration.yaml file (synced with the configuration file)
  372. # - always having the same AS/HS token and appservice ID in the registration.yaml file
  373. #
  374. # Learn more about this in `setup_install.yml`
  375. matrix_appservice_irc_registration_override_yaml: |
  376. id: appservice-irc
  377. as_token: "{{ matrix_appservice_irc_appservice_token }}"
  378. hs_token: "{{ matrix_appservice_irc_homeserver_token }}"
  379. matrix_appservice_irc_registration_override: "{{ matrix_appservice_irc_registration_override_yaml | from_yaml }}"