Matrix Docker Ansible eploy
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 

402 行
20 KiB

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