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.76k stars 1.03k forks source link

Error in /roles/galaxy/systemd_service_manager/tasks/restart_specified.yml #3461

Closed PeterEhinger closed 1 month ago

PeterEhinger commented 1 month ago

Playbook Configuration:

My vars.yml file looks like this:

---
matrix_domain: matrix.<domain>
matrix_homeserver_implementation: synapse
matrix_homeserver_generic_secret_key: 'string'
matrix_playbook_reverse_proxy_type: playbook-managed-traefik
devture_traefik_config_certificatesResolvers_acme_email: 'matrix@<domain>'

Matrix Server:

Ansible:

$ ansible --version
ansible [core 2.13.13]
  config file = /home/ubuntu/matrix-docker-ansible-deploy/ansible.cfg
  configured module search path = ['/home/ubuntu/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/ubuntu/.local/lib/python3.8/site-packages/ansible
  ansible collection location = /home/ubuntu/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/ubuntu/.local/bin/ansible
  python version = 3.8.10 (default, Jul 29 2024, 17:02:10) [GCC 9.4.0]
  jinja version = 3.1.4
  libyaml = True

Problem description:

I try to execute the installation command:

ansible-playbook -i inventory/hosts setup.yml --tags=install-all,ensure-matrix-users-created,start

The following error occurs here and unfortunately I could not find anything or everything I tried was unsuccessful.

TASK [galaxy/systemd_service_manager : Ensure systemd is reloaded] *************************************************
s_push: parser stack overflow
fatal: [matrix.<domain>]: 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 '/home/ubuntu/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.<domain>         : ok=183  changed=5    unreachable=0    failed=1    skipped=327  rescued=0    ignored=0   

Many thanks for your help.

spantaleev commented 1 month ago

Old Ansible / Jinja. See docs/ansible.md. There are at least a few of these same issues already reported.