spantaleev / matrix-docker-ansible-deploy

🐳 Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker
GNU Affero General Public License v3.0
4.9k stars 1.04k forks source link

devture_systemd_service_manager_services_list_auto + devture_systemd_service_manager_services_list_additional type mismatch #3390

Closed baloan closed 4 months ago

baloan commented 4 months ago

Describe the bug I was running below to update to the latest version after a few months letting matrix running mostly unattended without issues.

git pull origin master
rm -rf roles/galaxy
just roles
just run-tags setup-all,start

The update failed with an error:

...
TASK [galaxy/auxiliary : Ensure AUX commands are run] ***************************************************************************************************************************************

TASK [galaxy/systemd_service_manager : ansible.builtin.include_tasks] ***********************************************************************************************************************
included: /root/matrix-docker-ansible-deploy/roles/galaxy/systemd_service_manager/tasks/validate_config.yml for matrix.zntrl.de

TASK [galaxy/systemd_service_manager : Fail if devture_systemd_service_manager_service_restart_mode is invalid] *****************************************************************************
skipping: [matrix.zntrl.de]

TASK [galaxy/systemd_service_manager : ansible.builtin.include_tasks] ***********************************************************************************************************************
included: /root/matrix-docker-ansible-deploy/roles/galaxy/systemd_service_manager/tasks/restart_all.yml for matrix.zntrl.de

TASK [galaxy/systemd_service_manager : include_tasks] ***************************************************************************************************************************************
included: /root/matrix-docker-ansible-deploy/roles/galaxy/systemd_service_manager/tasks/restart_specified.yml for matrix.zntrl.de

TASK [galaxy/systemd_service_manager : Ensure systemd is reloaded] **************************************************************************************************************************
s_push: parser stack overflow
fatal: [matrix.zntrl.de]: FAILED! =>
  msg: |-
    The conditional check 'devture_systemd_service_manager_services_list_to_work_with | length > 0' failed. The error was: An unhandled exception occurred while templating '{{ devture_systemd_service_manager_services_list }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while templating '{{ devture_systemd_service_manager_services_list_auto + devture_systemd_service_manager_services_list_additional }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: Unexpected templating type error occurred on ({{ devture_systemd_service_manager_services_list_auto + devture_systemd_service_manager_services_list_additional }}): can only concatenate str (not "list") to str

    The error appears to be in '/root/matrix-docker-ansible-deploy/roles/galaxy/systemd_service_manager/tasks/restart_specified.yml': line 3, column 3, but may
    be elsewhere in the file depending on the exact syntax problem.

    The offending line appears to be:

    - when: devture_systemd_service_manager_services_list_to_work_with | length > 0
      ^ here

PLAY RECAP **********************************************************************************************************************************************************************************
matrix.zntrl.de            : ok=397  changed=45   unreachable=0    failed=1    skipped=543  rescued=0    ignored=0

error: Recipe `run` failed on line 38 with exit code 2
error: Recipe `run-tags` failed on line 42 with exit code 2

To Reproduce My vars.yml file looks like this:

# The bare domain name which represents your Matrix identity.
# Matrix user ids for your server will be of the form (`@user:<matrix-domain>`).
#
matrix_domain: zntrl.de

# The Matrix homeserver software to install.
# See:
#  - `roles/custom/matrix-base/defaults/main.yml` for valid options
# - the `docs/configuring-playbook-IMPLEMENTATION_NAME.md` documentation page, if one is available for your implementation choice
matrix_homeserver_implementation: synapse

# A secret used as a base, for generating various other secrets.
# You can put any string here, but generating a strong one is preferred (e.g. `pwgen -s 64 1`).
matrix_homeserver_generic_secret_key: '<redacted>'

# By default, the playbook manages its own Traefik (https://doc.traefik.io/traefik/) reverse-proxy server.
# It will retrieve SSL certificates for you on-demand and forward requests to all other components.
# For alternatives, see `docs/configuring-playbook-own-webserver.md`.
# 
matrix_playbook_reverse_proxy_type: playbook-managed-traefik
# matrix_playbook_reverse_proxy_type: other-traefik-container

devture_traefik_dashboard_enabled: true
devture_traefik_dashboard_hostname: "traefik.{{ matrix_domain }}"
devture_traefik_dashboard_basicauth_enabled: true
devture_traefik_dashboard_basicauth_user: andreas
devture_traefik_dashboard_basicauth_password: <redacted>

# This is something which is provided to Let's Encrypt when retrieving SSL certificates for domains.
#
# In case SSL renewal fails at some point, you'll also get an email notification there.
#
# If you decide to use another method for managing SSL certificates (different than the default Let's Encrypt),
# you won't be required to define this variable (see `docs/configuring-playbook-ssl-certificates.md`).
#
devture_traefik_config_certificatesResolvers_acme_email: 'andreas@baloghs.de'

# A Postgres password to use for the superuser Postgres user (called `matrix` by default).
#
# The playbook creates additional Postgres users and databases (one for each enabled service)
# using this superuser account.
devture_postgres_connection_password: '<redacted>'

# The playbook installs a Coturn TURN server by default, so that clients can make audio/video calls even from NAT-ed networks.
matrix_coturn_enabled: false

# By default, we configure Coturn's external IP address using the value specified for `ansible_host` in your `inventory/hosts` file.
# If this value is an external IP address, you can skip this section.
#
# If `ansible_host` is not the server's external IP address, you have 2 choices:
# 1. Uncomment the line below, to allow IP address auto-detection to happen (more on this below)
# 2. Uncomment and adjust the line below to specify an IP address manually
#
# By default, auto-detection will be attempted using the `https://ifconfig.co/json` API.
# Default values for this are specified in `matrix_coturn_turn_external_ip_address_auto_detection_*` variables in the Coturn role
# (see `roles/custom/matrix-coturn/defaults/main.yml`).
#
# If your server has multiple IP addresses, you may define them in another variable which allows a list of addresses.
# Example: `matrix_coturn_turn_external_ip_addresses: ['1.2.3.4', '4.5.6.7']`
#
# matrix_coturn_turn_external_ip_address: ''

# A shared secret (between Coturn and Synapse) used for authentication.
# You can put any string here, but generating a strong one is preferred (e.g. `pwgen -s 64 1`).
matrix_coturn_turn_static_auth_secret: '<redacted>'

# ----------------------------------------------------------------------

matrix_synapse_admin_enabled: true
matrix_registration_enabled: true
matrix_registration_admin_secret: "<redacted>"

matrix_synapse_enable_registration: false
matrix_synapse_registration_requires_token: true
matrix_synapse_enable_registration_captcha: true
matrix_synapse_recaptcha_public_key: '<redacted>'
matrix_synapse_recaptcha_private_key: '<redacted>'

matrix_synapse_log_level: "INFO"
matrix_synapse_storage_sql_log_level: "INFO"
matrix_synapse_root_log_level: "INFO"

# ----------------------------------------------------------------------

# add dimension and etherpad only after matrix has been set up
# matrix_dimension_enabled: true
# matrix_dimension_admins:
#   - "@baloan:{{ matrix_domain }}"
#   - "@dimension:{{ matrix_domain }}"
# matrix_dimension_access_token: "<redacted>"

etherpad_enabled: false

# jitsi

jitsi_enabled: true
jitsi_jicofo_component_secret: <redacted>
jitsi_jicofo_auth_password: <redacted>
jitsi_jvb_auth_password: <redacted>
jitsi_jibri_recorder_password: <redacted>
jitsi_jibri_xmpp_password: <redacted>
# jitsi_enable_auth: true
# jitsi_enable_guests: true

# ----------------------------------------------------------------------

# backup currently installed with cron script, see cron.d
# devture_postgres_backup_enabled: true

Expected behavior Normal startup.

Matrix Server:

Ansible: If your problem appears to be with Ansible, tell us:

spantaleev commented 4 months ago

Duplicate of https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3366

Upgrade your Ansible version.