Skip to content

Include handlers error make domserver #181

Closed
@BHenkemans

Description

@BHenkemans

While running make domserver I encountered the following error:

ERROR! this task 'include' has extra params, which is only allowed in the following modules: raw, include_role, win_shell, include_tasks, meta, shell, command, set_fact, add_host, import_tasks, script, group_by, import_role, win_command, include_vars

The error appears to be in '/home/gehack/domjudge-scripts/provision-contest/ansible/domserver.yml': line 62, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  handlers:
    - include: handlers.yml
      ^ here
make: *** [Makefile:37: domserver] Error 4

I resolved this by changing

  handlers:
    - include: handlers.yml

to

  handlers:
    - import_tasks: handlers.yml

This may be an issue in other files too. This is my ansible version

ansible [core 2.18.5]
  config file = /home/gehack/domjudge-scripts/provision-contest/ansible/ansible.cfg
  configured module search path = ['/home/gehack/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/gehack/.local/share/pipx/venvs/ansible/lib/python3.12/site-packages/ansible
  ansible collection location = /home/gehack/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/gehack/.local/bin/ansible
  python version = 3.12.3 (main, Feb  4 2025, 14:48:35) [GCC 13.3.0] (/home/gehack/.local/share/pipx/venvs/ansible/bin/python)
  jinja version = 3.1.6
  libyaml = True

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions