Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

439 righe
22 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_docker_image: "tedomum/matrix-appservice-irc:latest"
  5. matrix_appservice_irc_base_path: "{{ matrix_base_data_path }}/appservice-irc"
  6. # Controls whether the matrix-appservice-discord container exposes its HTTP port (tcp/9999 in the container).
  7. #
  8. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:9999"), or empty string to not expose.
  9. matrix_appservice_irc_container_http_host_bind_port: ''
  10. # A list of extra arguments to pass to the container
  11. matrix_appservice_irc_container_extra_arguments: []
  12. # List of systemd services that matrix-appservice-irc.service depends on.
  13. matrix_appservice_irc_systemd_required_services_list: ['docker.service']
  14. # List of systemd services that matrix-appservice-irc.service wants
  15. matrix_appservice_irc_systemd_wanted_services_list: []
  16. matrix_appservice_irc_configuration_yaml: |
  17. #jinja2: lstrip_blocks: True
  18. homeserver:
  19. url: "https://{{ matrix_server_fqn_matrix }}"
  20. domain: "{{ matrix_domain }}"
  21. enablePresence: true
  22. matrix_appservice_irc_configuration_extension_yaml: |
  23. # Your custom YAML configuration for Appservice IRC servers goes here.
  24. # This configuration extends the default starting configuration (`matrix_appservice_irc_configuration_yaml`).
  25. #
  26. # You can override individual variables from the default configuration, or introduce new ones.
  27. #
  28. # If you need something more special, you can take full control by
  29. # completely redefining `matrix_appservice_irc_configuration_yaml`.
  30. #
  31. # Example configuration extension follows:
  32. #
  33. # ircService:
  34. # databaseUri: "nedb:///data" # does not typically need modification
  35. # passwordEncryptionKeyPath: "/data/passkey.pem" # does not typically need modification
  36. # matrixHandler:
  37. # eventCacheSize: 4096
  38. # servers:
  39. # # The address of the server to connect to.
  40. # irc.example.com:
  41. # # A human-readable short name. This is used to label IRC status rooms
  42. # # where matrix users control their connections.
  43. # # E.g. 'ExampleNet IRC Bridge status'.
  44. # # It is also used in the Third Party Lookup API as the instance `desc`
  45. # # property, where each server is an instance.
  46. # name: "ExampleNet"
  47. #
  48. # additionalAddresses: [ "irc2.example.com" ]
  49. # #
  50. # # [DEPRECATED] Use `name`, above, instead.
  51. # # A human-readable description string
  52. # # description: "Example.com IRC network"
  53. #
  54. # # An ID for uniquely identifying this server amongst other servers being bridged.
  55. # # networkId: "example"
  56. #
  57. # # URL to an icon used as the network icon whenever this network appear in
  58. # # a network list. (Like in the riot room directory, for instance.)
  59. # # icon: https://example.com/images/hash.png
  60. #
  61. # # The port to connect to. Optional.
  62. # port: 6697
  63. # # Whether to use SSL or not. Default: false.
  64. # ssl: true
  65. # # Whether or not IRC server is using a self-signed cert or not providing CA Chain
  66. # sslselfsign: false
  67. # # Should the connection attempt to identify via SASL (if a server or user password is given)
  68. # # If false, this will use PASS instead. If SASL fails, we do not fallback to PASS.
  69. # sasl: false
  70. # # Whether to allow expired certs when connecting to the IRC server.
  71. # # Usually this should be off. Default: false.
  72. # allowExpiredCerts: false
  73. # # A specific CA to trust instead of the default CAs. Optional.
  74. # #ca: |
  75. # # -----BEGIN CERTIFICATE-----
  76. # # ...
  77. # # -----END CERTIFICATE-----
  78. #
  79. # #
  80. # # The connection password to send for all clients as a PASS (or SASL, if enabled above) command. Optional.
  81. # # password: 'pa$$w0rd'
  82. # #
  83. # # Whether or not to send connection/error notices to real Matrix users. Default: true.
  84. # sendConnectionMessages: true
  85. #
  86. # quitDebounce:
  87. # # Whether parts due to net-splits are debounced for delayMs, to allow
  88. # # time for the netsplit to resolve itself. A netsplit is detected as being
  89. # # a QUIT rate higher than quitsPerSecond. Default: false.
  90. # enabled: false
  91. # # The maximum number of quits per second acceptable above which a netsplit is
  92. # # considered ongoing. Default: 5.
  93. # quitsPerSecond: 5
  94. # # The time window in which to wait before bridging a QUIT to Matrix that occurred during
  95. # # a netsplit. Debouncing is jittered randomly between delayMinMs and delayMaxMs so that the HS
  96. # # is not sent many requests to leave rooms all at once if a netsplit occurs and many
  97. # # people to not rejoin.
  98. # # If the user with the same IRC nick as the one who sent the quit rejoins a channel
  99. # # they are considered back online and the quit is not bridged, so long as the rejoin
  100. # # occurs before the randomly-jittered timeout is not reached.
  101. # # Default: 3600000, = 1h
  102. # delayMinMs: 3600000 # 1h
  103. # # Default: 7200000, = 2h
  104. # delayMaxMs: 7200000 # 2h
  105. #
  106. # # A map for conversion of IRC user modes to Matrix power levels. This enables bridging
  107. # # of IRC ops to Matrix power levels only, it does not enable the reverse. If a user has
  108. # # been given multiple modes, the one that maps to the highest power level will be used.
  109. # modePowerMap:
  110. # o: 50
  111. #
  112. # botConfig:
  113. # # Enable the presence of the bot in IRC channels. The bot serves as the entity
  114. # # which maps from IRC -> Matrix. You can disable the bot entirely which
  115. # # means IRC -> Matrix chat will be shared by active "M-Nick" connections
  116. # # in the room. If there are no users in the room (or if there are users
  117. # # but their connections are not on IRC) then nothing will be bridged to
  118. # # Matrix. If you're concerned about the bot being treated as a "logger"
  119. # # entity, then you may want to disable the bot. If you want IRC->Matrix
  120. # # but don't want to have TCP connections to IRC unless a Matrix user speaks
  121. # # (because your client connection limit is low), then you may want to keep
  122. # # the bot enabled. Default: true.
  123. # # NB: If the bot is disabled, you SHOULD have matrix-to-IRC syncing turned
  124. # # on, else there will be no users and no bot in a channel (meaning no
  125. # # messages to Matrix!) until a Matrix user speaks which makes a client
  126. # # join the target IRC channel.
  127. # # NBB: The bridge bot IRC client will still join the target IRC network so
  128. # # it can service bridge-specific queries from the IRC-side e.g. so
  129. # # real IRC clients have a way to change their Matrix display name.
  130. # # See https://github.com/matrix-org/matrix-appservice-irc/issues/55
  131. # enabled: true
  132. # # The nickname to give the AS bot.
  133. # nick: "MatrixBot"
  134. # # The password to give to NickServ or IRC Server for this nick. Optional.
  135. # # password: "helloworld"
  136. # #
  137. # # Join channels even if there are no Matrix users on the other side of
  138. # # the bridge. Set to false to prevent the bot from joining channels which have no
  139. # # real matrix users in them, even if there is a mapping for the channel.
  140. # # Default: true
  141. # joinChannelsIfNoUsers: true
  142. #
  143. # # Configuration for PMs / private 1:1 communications between users.
  144. # privateMessages:
  145. # # Enable the ability for PMs to be sent to/from IRC/Matrix.
  146. # # Default: true.
  147. # enabled: true
  148. # # Prevent Matrix users from sending PMs to the following IRC nicks.
  149. # # Optional. Default: [].
  150. # # exclude: ["Alice", "Bob"] # NOT YET IMPLEMENTED
  151. #
  152. # # Should created Matrix PM rooms be federated? If false, only users on the
  153. # # HS attached to this AS will be able to interact with this room.
  154. # # Optional. Default: true.
  155. # federate: true
  156. #
  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. #
  203. # # Configuration for controlling how Matrix and IRC membership lists are
  204. # # synced.
  205. # membershipLists:
  206. # # Enable the syncing of membership lists between IRC and Matrix. This
  207. # # can have a significant effect on performance on startup as the lists are
  208. # # synced. This must be enabled for anything else in this section to take
  209. # # effect. Default: false.
  210. # enabled: false
  211. #
  212. # # Syncing membership lists at startup can result in hundreds of members to
  213. # # process all at once. This timer drip feeds membership entries at the
  214. # # specified rate. Default: 10000. (10s)
  215. # floodDelayMs: 10000
  216. #
  217. # global:
  218. # ircToMatrix:
  219. # # Get a snapshot of all real IRC users on a channel (via NAMES) and
  220. # # join their virtual matrix clients to the room.
  221. # initial: false
  222. # # Make virtual matrix clients join and leave rooms as their real IRC
  223. # # counterparts join/part channels. Default: false.
  224. # incremental: false
  225. #
  226. # matrixToIrc:
  227. # # Get a snapshot of all real Matrix users in the room and join all of
  228. # # them to the mapped IRC channel on startup. Default: false.
  229. # initial: false
  230. # # Make virtual IRC clients join and leave channels as their real Matrix
  231. # # counterparts join/leave rooms. Make sure your 'maxClients' value is
  232. # # high enough! Default: false.
  233. # incremental: false
  234. #
  235. # # Apply specific rules to Matrix rooms. Only matrix-to-IRC takes effect.
  236. # rooms:
  237. # - room: "!fuasirouddJoxtwfge:localhost"
  238. # matrixToIrc:
  239. # initial: false
  240. # incremental: false
  241. #
  242. # # Apply specific rules to IRC channels. Only IRC-to-matrix takes effect.
  243. # channels:
  244. # - channel: "#foo"
  245. # ircToMatrix:
  246. # initial: false
  247. # incremental: false
  248. #
  249. # mappings:
  250. # # 1:many mappings from IRC channels to room IDs on this IRC server.
  251. # # The matrix room must already exist. Your matrix client should expose
  252. # # the room ID in a "settings" page for the room.
  253. # "#thepub": ["!kieouiJuedJoxtVdaG:localhost"]
  254. #
  255. # # Configuration for virtual matrix users. The following variables are
  256. # # exposed:
  257. # # $NICK => The IRC nick
  258. # # $SERVER => The IRC server address (e.g. "irc.example.com")
  259. # matrixClients:
  260. # # The user ID template to use when creating virtual matrix users. This
  261. # # MUST have $NICK somewhere in it.
  262. # # Optional. Default: "@$SERVER_$NICK".
  263. # # Example: "@irc.example.com_Alice:example.com"
  264. # userTemplate: "@irc_$NICK"
  265. # # The display name to use for created matrix clients. This should have
  266. # # $NICK somewhere in it if it is specified. Can also use $SERVER to
  267. # # insert the IRC domain.
  268. # # Optional. Default: "$NICK (IRC)". Example: "Alice (IRC)"
  269. # displayName: "$NICK (IRC)"
  270. # # Number of tries a client can attempt to join a room before the request
  271. # # is discarded. You can also use -1 to never retry or 0 to never give up.
  272. # # Optional. Default: -1
  273. # joinAttempts: -1
  274. #
  275. # # Configuration for virtual IRC users. The following variables are exposed:
  276. # # $LOCALPART => The user ID localpart ("alice" in @alice:localhost)
  277. # # $USERID => The user ID
  278. # # $DISPLAY => The display name of this user, with excluded characters
  279. # # (e.g. space) removed. If the user has no display name, this
  280. # # falls back to $LOCALPART.
  281. # ircClients:
  282. # # The template to apply to every IRC client nick. This MUST have either
  283. # # $DISPLAY or $USERID or $LOCALPART somewhere in it.
  284. # # Optional. Default: "M-$DISPLAY". Example: "M-Alice".
  285. # nickTemplate: "$DISPLAY[m]"
  286. # # True to allow virtual IRC clients to change their nick on this server
  287. # # by issuing !nick <server> <nick> commands to the IRC AS bot.
  288. # # This is completely freeform: it will NOT follow the nickTemplate.
  289. # allowNickChanges: true
  290. # # The max number of IRC clients that will connect. If the limit is
  291. # # reached, the client that spoke the longest time ago will be
  292. # # disconnected and replaced.
  293. # # Optional. Default: 30.
  294. # maxClients: 30
  295. # # IPv6 configuration.
  296. # ipv6:
  297. # # Optional. Set to true to force IPv6 for outgoing connections.
  298. # only: false
  299. # # Optional. The IPv6 prefix to use for generating unique addresses for each
  300. # # connected user. If not specified, all users will connect from the same
  301. # # (default) address. This may require additional OS-specific work to allow
  302. # # for the node process to bind to multiple different source addresses
  303. # # e.g IP_FREEBIND on Linux, which requires an LD_PRELOAD with the library
  304. # # https://github.com/matrix-org/freebindfree as Node does not expose setsockopt.
  305. # # prefix: "2001:0db8:85a3::" # modify appropriately
  306. # #
  307. # # The maximum amount of time in seconds that the client can exist
  308. # # without sending another message before being disconnected. Use 0 to
  309. # # not apply an idle timeout. This value is ignored if this IRC server is
  310. # # mirroring matrix membership lists to IRC. Default: 172800 (48 hours)
  311. # idleTimeout: 10800
  312. # # The number of millseconds to wait between consecutive reconnections if a
  313. # # client gets disconnected. Setting to 0 will cause the scheduling to be
  314. # # disabled, i.e. it will be scheduled immediately (with jitter.
  315. # # Otherwise, the scheduling interval will be used such that one client
  316. # # reconnect for this server will be handled every reconnectIntervalMs ms using
  317. # # a FIFO queue.
  318. # # Default: 5000 (5 seconds)
  319. # reconnectIntervalMs: 5000
  320. # # The number of concurrent reconnects if a user has been disconnected unexpectedly
  321. # # (e.g. a netsplit). You should set this to a reasonably high number so that
  322. # # bridges are not waiting an eternity to reconnect all its clients if
  323. # # we see a massive number of disconnect. This is unrelated to the reconnectIntervalMs
  324. # # setting above which is for connecting on restart of the bridge. Set to 0 to
  325. # # immediately try to reconnect all users.
  326. # # Default: 50
  327. # concurrentReconnectLimit: 50
  328. # # The number of lines to allow being sent by the IRC client that has received
  329. # # a large block of text to send from matrix. If the number of lines that would
  330. # # be sent is > lineLimit, the text will instead be uploaded to matrix and the
  331. # # resulting URI is treated as a file. As such, a link will be sent to the IRC
  332. # # side instead of potentially spamming IRC and getting the IRC client kicked.
  333. # # Default: 3.
  334. # lineLimit: 3
  335. # # A list of user modes to set on every IRC client. For example, "RiG" would set
  336. # # +R, +i and +G on every IRC connection when they have successfully connected.
  337. # # User modes vary wildly depending on the IRC network you're connecting to,
  338. # # so check before setting this value. Some modes may not work as intended
  339. # # through the bridge e.g. caller ID as there is no way to /ACCEPT.
  340. # # Default: "" (no user modes)
  341. # # userModes: "R"
  342. #
  343. # # Configuration for an ident server. If you are running a public bridge it is
  344. # # advised you setup an ident server so IRC mods can ban specific matrix users
  345. # # rather than the application service itself.
  346. # ident:
  347. # # True to listen for Ident requests and respond with the
  348. # # matrix user's user_id (converted to ASCII, respecting RFC 1413).
  349. # # Default: false.
  350. # enabled: false
  351. # # The port to listen on for incoming ident requests.
  352. # # Ports below 1024 require root to listen on, and you may not want this to
  353. # # run as root. Instead, you can get something like an Apache to yank up
  354. # # incoming requests to 113 to a high numbered port. Set the port to listen
  355. # # on instead of 113 here.
  356. # # Default: 113.
  357. # port: 1113
  358. # # The address to listen on for incoming ident requests.
  359. # # Default: 0.0.0.0
  360. # address: "::"
  361. #
  362. # # Configuration for logging. Optional. Default: console debug level logging
  363. # # only.
  364. # logging:
  365. # # Level to log on console/logfile. One of error|warn|info|debug
  366. # level: "debug"
  367. # # The file location to log to. This is relative to the project directory.
  368. # logfile: "debug.log"
  369. # # The file location to log errors to. This is relative to the project
  370. # # directory.
  371. # errfile: "errors.log"
  372. # # Whether to log to the console or not.
  373. # toConsole: true
  374. # # The max number of files to keep. Files will be overwritten eventually due
  375. # # to rotations.
  376. # maxFiles: 5
  377. #
  378. # # Optional. Enable Prometheus metrics. If this is enabled, you MUST install `prom-client`:
  379. # # $ npm install prom-client@6.3.0
  380. # # Metrics will then be available via GET /metrics on the bridge listening port (-p).
  381. # metrics:
  382. # # Whether to actually enable the metric endpoint. Default: false
  383. # enabled: true
  384. # # When collecting remote user active times, which "buckets" should be used. Defaults are given below.
  385. # # The bucket name is formed of a duration and a period. (h=hours,d=days,w=weeks).
  386. # remoteUserAgeBuckets:
  387. # - "1h"
  388. # - "1d"
  389. # - "1w"
  390. #
  391. # # Configuration options for the debug HTTP API. To access this API, you must
  392. # # append ?access_token=$APPSERVICE_TOKEN (from the registration file) to the requests.
  393. # #
  394. # # The debug API exposes the following endpoints:
  395. # #
  396. # # GET /irc/$domain/user/$user_id => Return internal state for the IRC client for this user ID.
  397. # #
  398. # # POST /irc/$domain/user/$user_id => Issue a raw IRC command down this connection.
  399. # # Format: new line delimited commands as per IRC protocol.
  400. # #
  401. # debugApi:
  402. # # True to enable the HTTP API endpoint. Default: false.
  403. # enabled: false
  404. # # The port to host the HTTP API.
  405. # port: 11100
  406. #
  407. # # Configuration for the provisioning API.
  408. # #
  409. # # GET /_matrix/provision/link
  410. # # GET /_matrix/provision/unlink
  411. # # GET /_matrix/provision/listlinks
  412. # #
  413. # provisioning:
  414. # # True to enable the provisioning HTTP endpoint. Default: false.
  415. # enabled: false
  416. # # The number of seconds to wait before giving up on getting a response from
  417. # # an IRC channel operator. If the channel operator does not respond within the
  418. # # allotted time period, the provisioning request will fail.
  419. # # Default: 300 seconds (5 mins)
  420. # requestTimeoutSeconds: 300
  421. #
  422. # # WARNING: The bridge needs to send plaintext passwords to the IRC server, it cannot
  423. # # send a password hash. As a result, passwords (NOT hashes) are stored encrypted in
  424. # # the database.
  425. # #
  426. matrix_appservice_irc_configuration_extension: "{{ matrix_appservice_irc_configuration_extension_yaml|from_yaml if matrix_appservice_irc_configuration_extension_yaml|from_yaml else {} }}"
  427. matrix_appservice_irc_configuration: "{{ matrix_appservice_irc_configuration_yaml|from_yaml|combine(matrix_appservice_irc_configuration_extension, recursive=True) }}"