Matrix Docker Ansible eploy
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

221 linhas
12 KiB

  1. # SOME DESCRIPTIVE TITLE.
  2. # Copyright (C) 2018-2026, Slavi Pantaleev, Aine Etke, MDAD community members
  3. # This file is distributed under the same license as the matrix-docker-ansible-deploy package.
  4. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
  5. #
  6. #, fuzzy
  7. msgid ""
  8. msgstr ""
  9. "Project-Id-Version: matrix-docker-ansible-deploy \n"
  10. "Report-Msgid-Bugs-To: \n"
  11. "POT-Creation-Date: 2026-08-29 06:02+0000\n"
  12. "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  13. "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  14. "Language-Team: LANGUAGE <LL@li.org>\n"
  15. "MIME-Version: 1.0\n"
  16. "Content-Type: text/plain; charset=UTF-8\n"
  17. "Content-Transfer-Encoding: 8bit\n"
  18. #: ../../../docs/ansible.md:11
  19. msgid "Using Ansible for the playbook"
  20. msgstr ""
  21. #: ../../../docs/ansible.md:13
  22. msgid "This playbook is meant to be run using [Ansible](https://www.ansible.com/)."
  23. msgstr ""
  24. #: ../../../docs/ansible.md:15
  25. msgid "Ansible typically runs on your local computer and carries out tasks on a remote server. If your local computer cannot run Ansible, you can also run Ansible on some server somewhere (including the server you wish to install to)."
  26. msgstr ""
  27. #: ../../../docs/ansible.md:17
  28. msgid "Supported Ansible versions"
  29. msgstr ""
  30. #: ../../../docs/ansible.md:19
  31. msgid "To manually check which version of Ansible you're on, run: `ansible --version`."
  32. msgstr ""
  33. #: ../../../docs/ansible.md:21
  34. msgid "For the **best experience**, we recommend getting the **latest version of Ansible available**."
  35. msgstr ""
  36. #: ../../../docs/ansible.md:23
  37. msgid "We're not sure what's the minimum version of Ansible that can run this playbook successfully. The lowest version that we suspect (on 2025-09-03) to be working fine is: `ansible-core` (`2.15.1`)."
  38. msgstr ""
  39. #: ../../../docs/ansible.md:25
  40. msgid "If your distro ships with an Ansible version older than this, you may run into issues. Consider [Upgrading Ansible](#upgrading-ansible) or [using Ansible via Docker](#using-ansible-via-docker)."
  41. msgstr ""
  42. #: ../../../docs/ansible.md:28
  43. msgid "One reason for the version requirement being as such is that the playbook by default installs Docker for you using [this Docker role](https://github.com/geerlingguy/ansible-role-docker) which [has a hard requirement on Ansible v2.15.1](https://github.com/geerlingguy/ansible-role-docker/commit/7f44a1d9ad8132819ea9852918bca5dab8757cd0). If you install Docker yourself another way, you can tell the playbook to skip running this role (by adding `matrix_playbook_docker_installation_enabled: false` to your `vars.yml` configuration). It may then be possible to get the playbook running on an older version of Ansible. Still, this is a complication and your mileage may vary. We recommend [upgrading Ansible](#upgrading-ansible) instead of going into uncharted territory."
  44. msgstr ""
  45. #: ../../../docs/ansible.md:30
  46. msgid "Upgrading Ansible"
  47. msgstr ""
  48. #: ../../../docs/ansible.md:32
  49. msgid "Depending on your distribution, you may be able to upgrade Ansible in a few different ways:"
  50. msgstr ""
  51. #: ../../../docs/ansible.md:34
  52. msgid "by using an additional repository (PPA, etc.), which provides newer Ansible versions. See instructions for [CentOS](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-on-rhel-centos-or-fedora), [Debian](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-on-debian), or [Ubuntu](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-on-ubuntu) on the Ansible website."
  53. msgstr ""
  54. #: ../../../docs/ansible.md:36
  55. msgid "by removing the Ansible package (`yum remove ansible` or `apt-get remove ansible`) and installing via [pip](https://pip.pypa.io/en/stable/installation/) (`pip install ansible`)."
  56. msgstr ""
  57. #: ../../../docs/ansible.md:38
  58. msgid "If using the `pip` method, do note that the `ansible-playbook` binary may not be on the `$PATH` (https://linuxconfig.org/linux-path-environment-variable), but in some more special location like `/usr/local/bin/ansible-playbook`. You may need to invoke it using the full path."
  59. msgstr ""
  60. #: ../../../docs/ansible.md:40
  61. msgid "**Note**: Both of the above methods are a bad way to run system software such as Ansible. If you find yourself needing to resort to such hacks, please consider reporting a bug to your distribution and/or switching to a sane distribution, which provides up-to-date software."
  62. msgstr ""
  63. #: ../../../docs/ansible.md:42
  64. msgid "SSH host key and passphrase prompts"
  65. msgstr ""
  66. #: ../../../docs/ansible.md:44
  67. msgid "If Ansible fails with `Host key verification failed` (or a similar `Data could not be sent to remote host` error) without asking you to confirm the SSH host key of your server, you're likely on Ansible 2.21 or later."
  68. msgstr ""
  69. #: ../../../docs/ansible.md:46
  70. msgid "Since Ansible 2.21, forked workers call `setsid()` and thus lose the controlling terminal. SSH cannot open `/dev/tty` anymore, so it can no longer ask you to confirm an unknown host key or prompt you for the passphrase of an SSH key."
  71. msgstr ""
  72. #: ../../../docs/ansible.md:48
  73. msgid "To fix host key errors, connect to the server once (e.g. `ssh root@matrix.example.com`) and confirm the host key. Ansible runs after that will find it in your `known_hosts` file."
  74. msgstr ""
  75. #: ../../../docs/ansible.md:50
  76. msgid "If your SSH key is protected by a passphrase, load it into an [ssh-agent](https://man.openbsd.org/ssh-agent) (e.g. `ssh-add ~/.ssh/id_ed25519`), so that SSH does not need to prompt for the passphrase."
  77. msgstr ""
  78. #: ../../../docs/ansible.md:52
  79. msgid "**Note**: if you're [using Ansible via Docker](#using-ansible-via-docker), host keys of previously unknown hosts are accepted automatically, so only the passphrase advice above applies to you. For the agent to be reachable inside the container, share its socket by adding `--mount type=bind,src=$SSH_AUTH_SOCK,dst=/ssh-agent --env SSH_AUTH_SOCK=/ssh-agent` to `docker run`. If the key is already loaded into the agent, you do not need to mount the SSH key file into the container at all."
  80. msgstr ""
  81. #: ../../../docs/ansible.md:54
  82. msgid "Using Ansible via Docker"
  83. msgstr ""
  84. #: ../../../docs/ansible.md:56
  85. msgid "Alternatively, you can run Ansible inside a Docker container (powered by the [ghcr.io/devture/ansible](https://github.com/devture/docker-ansible/pkgs/container/ansible) Docker image)."
  86. msgstr ""
  87. #: ../../../docs/ansible.md:58
  88. msgid "This ensures that:"
  89. msgstr ""
  90. #: ../../../docs/ansible.md:60
  91. msgid "you're using a very recent Ansible version, which is less likely to be incompatible with the playbook"
  92. msgstr ""
  93. #: ../../../docs/ansible.md:61
  94. msgid "you also get access to the [agru](https://github.com/etkecc/agru) tool for quicker Ansible role installation (when running `just roles`) compared to `ansible-galaxy`"
  95. msgstr ""
  96. #: ../../../docs/ansible.md:63
  97. msgid "You can either [run Ansible in a container on the Matrix server itself](#running-ansible-in-a-container-on-the-matrix-server-itself) or [run Ansible in a container on another computer (not the Matrix server)](#running-ansible-in-a-container-on-another-computer-not-the-matrix-server)."
  98. msgstr ""
  99. #: ../../../docs/ansible.md:65
  100. msgid "💡 If you use [Visual Studio Code](https://code.visualstudio.com/) or [GitHub Codespaces](https://github.com/features/codespaces), the playbook also ships a [dev container](https://containers.dev/) configuration (see the `.devcontainer/` directory) based on this same Ansible Docker image, which can prepare such a containerized Ansible environment for you automatically."
  101. msgstr ""
  102. #: ../../../docs/ansible.md:67
  103. msgid "Running Ansible in a container on the Matrix server itself"
  104. msgstr ""
  105. #: ../../../docs/ansible.md:69
  106. msgid "To run Ansible in a (Docker) container on the Matrix server itself, you need to have a working Docker installation. Docker is normally installed by the playbook, so this may be a bit of a chicken and egg problem. To solve it:"
  107. msgstr ""
  108. #: ../../../docs/ansible.md:71
  109. msgid "you **either** need to install Docker manually first. Follow [the upstream instructions](https://docs.docker.com/engine/install/) for your distribution and consider setting `matrix_playbook_docker_installation_enabled: false` in your `vars.yml` file, to prevent the playbook from installing Docker"
  110. msgstr ""
  111. #: ../../../docs/ansible.md:72
  112. msgid "**or** you need to run the playbook in another way (e.g. [Running Ansible in a container on another computer (not the Matrix server)](#running-ansible-in-a-container-on-another-computer-not-the-matrix-server)) at least the first time around"
  113. msgstr ""
  114. #: ../../../docs/ansible.md:74
  115. msgid "Once you have a working Docker installation on the server, **clone the playbook** somewhere on the server and configure it as per usual (`inventory/hosts`, `inventory/host_vars/…`, etc.), as described in [configuring the playbook](configuring-playbook.md)."
  116. msgstr ""
  117. #: ../../../docs/ansible.md:76
  118. msgid "You would then need to add `ansible_connection=community.docker.nsenter` to the host line in `inventory/hosts`. This tells Ansible to connect to the \"remote\" machine by switching Linux namespaces with [nsenter](https://man7.org/linux/man-pages/man1/nsenter.1.html), instead of using SSH."
  119. msgstr ""
  120. #: ../../../docs/ansible.md:78
  121. msgid "Alternatively, you can leave your `inventory/hosts` as is and specify the connection type in **each** `ansible-playbook` call you do later, like this: `just install-all --connection=community.docker.nsenter` (or `ansible-playbook --connection=community.docker.nsenter …`)."
  122. msgstr ""
  123. #: ../../../docs/ansible.md:80
  124. #: ../../../docs/ansible.md:102
  125. msgid "Run this from the playbook's directory:"
  126. msgstr ""
  127. #: ../../../docs/ansible.md:94
  128. #: ../../../docs/ansible.md:117
  129. msgid "Once you execute the above command, you'll be dropped into a `/work` directory inside a Docker container. The `/work` directory contains the playbook's code."
  130. msgstr ""
  131. #: ../../../docs/ansible.md:96
  132. #: ../../../docs/ansible.md:119
  133. msgid "First, consider running `git config --global --add safe.directory /work` to [resolve directory ownership issues](#resolve-directory-ownership-issues)."
  134. msgstr ""
  135. #: ../../../docs/ansible.md:98
  136. msgid "Finally, you can execute `just` or `ansible-playbook …` (e.g. `ansible-playbook --connection=community.docker.nsenter …`) commands as per normal now."
  137. msgstr ""
  138. #: ../../../docs/ansible.md:100
  139. msgid "Running Ansible in a container on another computer (not the Matrix server)"
  140. msgstr ""
  141. #: ../../../docs/ansible.md:115
  142. msgid "The above command tries to mount an SSH key (`$HOME/.ssh/id_ed25519`) into the container (at `/root/.ssh/id_ed25519`). If your SSH key is at a different path (not in `$HOME/.ssh/id_ed25519`), adjust that part."
  143. msgstr ""
  144. #: ../../../docs/ansible.md:121
  145. msgid "Finally, you execute `just` or `ansible-playbook …` commands as per normal now."
  146. msgstr ""
  147. #: ../../../docs/ansible.md:123
  148. msgid "If you don't use SSH keys for authentication"
  149. msgstr ""
  150. #: ../../../docs/ansible.md:125
  151. msgid "If you don't use SSH keys for authentication, simply remove that whole line (`--mount type=bind,src$HOME/.ssh/id_ed25519,dst=/root/.ssh/id_ed25519,ro`)."
  152. msgstr ""
  153. #: ../../../docs/ansible.md:127
  154. msgid "To authenticate at your server using a password, you need to add a package. So, when you are in the shell of the ansible docker container (the previously used `docker run -it …` command), run:"
  155. msgstr ""
  156. #: ../../../docs/ansible.md:133
  157. msgid "Then, to be asked for the password whenever running an `ansible-playbook` command add `--ask-pass` to the arguments of the command."
  158. msgstr ""
  159. #: ../../../docs/ansible.md:135
  160. msgid "Resolve directory ownership issues"
  161. msgstr ""
  162. #: ../../../docs/ansible.md:137
  163. msgid "Because you're `root` in the container running Ansible and this likely differs from the owner (your regular user account) of the playbook directory outside of the container, certain playbook features which use `git` locally may report warnings such as:"
  164. msgstr ""
  165. #: ../../../docs/ansible.md:139
  166. msgid "fatal: unsafe repository ('/work' is owned by someone else) To add an exception for this directory, call: git config --global --add safe.directory /work"
  167. msgstr ""
  168. #: ../../../docs/ansible.md:143
  169. msgid "These errors can be resolved by making `git` trust the playbook directory by running `git config --global --add safe.directory /work`"
  170. msgstr ""