You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running into an error trying to use devops.avahi with ansible 2.15.2. I'm not sure what it is complaining about, as I am not setting any avahi int values in my host or group variables, so I'm assuming this is coming from some incompatibility with the defaults in the role and the version of ansible I am running.
TASK [debops.debops.avahi : Configure avahi-daemon] ****************************************************************************************************
task path: /root/.ansible/collections/ansible_collections/debops/debops/roles/avahi/tasks/main.yml:32
The full traceback is:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/ansible/template/__init__.py", line 1001, in do_template
res = myenv.concat(rf)
File "/usr/lib/python3/dist-packages/ansible/template/native_helpers.py", line 83, in ansible_concat
return ''.join([to_text(v) for v in nodes])
File "/usr/lib/python3/dist-packages/ansible/template/native_helpers.py", line 83, in <listcomp>
return ''.join([to_text(v) for v in nodes])
File "<template>", line 161, in root
File "/usr/lib/python3/dist-packages/jinja2/runtime.py", line 349, in call
return __obj(*args, **kwargs)
File "/usr/lib/python3/dist-packages/jinja2/runtime.py", line 814, in __call__
return self._invoke(arguments, autoescape)
File "/usr/lib/python3/dist-packages/jinja2/runtime.py", line 828, in _invoke
rv = self._func(*arguments)
File "<template>", line 158, in macro
TypeError: sequence item 27: expected str instance, int found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/ansible/plugins/action/template.py", line 152, in run
resultant = templar.do_template(template_data, preserve_trailing_newlines=True, escape_backslashes=False, overrides=overrides)
File "/usr/lib/python3/dist-packages/ansible/template/__init__.py", line 1012, in do_template
raise AnsibleError("Unexpected templating type error occurred on (%s): %s" % (to_native(data), to_native(te)), orig_exc=te)
ansible.errors.AnsibleError: Unexpected templating type error occurred on ({# Copyright (C) 2017-2019 Maciej Delmanowski <drybjed@gmail.com>
# Copyright (C) 2017-2019 DebOps <https://debops.org/>
# SPDX-License-Identifier: GPL-2.0-or-later
#}
# {{ ansible_managed }}
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# avahi is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with avahi; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
# See avahi-daemon.conf(5) for more information on this configuration
# file!
{% macro print_config(section, data) %}
[{{ section }}]
{% for key in data.keys() %}
{% if data[key] is iterable and data[key] is not string and data[key] is not mapping %}
{% if data[key] %}
{{ key }}={{ data[key] | join(', ') }}
{% else %}
#{{ key }}={{ data[key] | join(', ') }}
{% endif %}
{% elif data[key] | bool and data[key] is not iterable %}
{{ key }}=yes
{% elif not data[key] | bool and data[key] is not iterable %}
{% if data[key] is not none %}
{% if data[key] | int or data[key] | string == '0' %}
{{ key }}={{ data[key] }}
{% else %}
{{ key }}=no
{% endif %}
{% endif %}
{% else %}
{% if data[key] %}
{{ key }}={{ data[key] }}
{% else %}
#{{ key }}={{ data[key] }}
{% endif %}
{% endif %}
{% endfor %}
{% endmacro %}
{{ print_config('server', avahi__daemon_conf_default_server | combine(avahi__daemon_conf_server)) }}
{{ print_config('wide-area', avahi__daemon_conf_default_wide_area | combine(avahi__daemon_conf_wide_area)) }}
{{ print_config('publish', avahi__daemon_conf_default_publish | combine(avahi__daemon_conf_publish)) }}
{{ print_config('reflector', avahi__daemon_conf_default_reflector | combine(avahi__daemon_conf_reflector)) }}
{{ print_config('rlimits', avahi__daemon_conf_default_rlimits | combine(avahi__daemon_conf_rlimits)) }}
): sequence item 27: expected str instance, int found. sequence item 27: expected str instance, int found
fatal: [morpheus.lapseofthought.com]: FAILED! => {
"changed": false,
"msg": "AnsibleError: Unexpected templating type error occurred on ({# Copyright (C) 2017-2019 Maciej Delmanowski <drybjed@gmail.com>\n # Copyright (C) 2017-2019 DebOps <https://debops.org/>\n # SPDX-License-Identifier: GPL-2.0-or-later\n #}\n# {{ ansible_managed }}\n\n# This file is part of avahi.\n#\n# avahi is free software; you can redistribute it and/or modify it\n# under the terms of the GNU Lesser General Public License as\n# published by the Free Software Foundation; either version 2 of the\n# License, or (at your option) any later version.\n#\n# avahi is distributed in the hope that it will be useful, but WITHOUT\n# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public\n# License for more details.\n#\n# You should have received a copy of the GNU Lesser General Public\n# License along with avahi; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307\n# USA.\n\n# See avahi-daemon.conf(5) for more information on this configuration\n# file!\n\n{% macro print_config(section, data) %}\n[{{ section }}]\n{% for key in data.keys() %}\n{% if data[key] is iterable and data[key] is not string and data[key] is not mapping %}\n{% if data[key] %}\n{{ key }}={{ data[key] | join(', ') }}\n{% else %}\n#{{ key }}={{ data[key] | join(', ') }}\n{% endif %}\n{% elif data[key] | bool and data[key] is not iterable %}\n{{ key }}=yes\n{% elif not data[key] | bool and data[key] is not iterable %}\n{% if data[key] is not none %}\n{% if data[key] | int or data[key] | string == '0' %}\n{{ key }}={{ data[key] }}\n{% else %}\n{{ key }}=no\n{% endif %}\n{% endif %}\n{% else %}\n{% if data[key] %}\n{{ key }}={{ data[key] }}\n{% else %}\n#{{ key }}={{ data[key] }}\n{% endif %}\n{% endif %}\n{% endfor %}\n{% endmacro %}\n{{ print_config('server', avahi__daemon_conf_default_server | combine(avahi__daemon_conf_server)) }}\n{{ print_config('wide-area', avahi__daemon_conf_default_wide_area | combine(avahi__daemon_conf_wide_area)) }}\n{{ print_config('publish', avahi__daemon_conf_default_publish | combine(avahi__daemon_conf_publish)) }}\n{{ print_config('reflector', avahi__daemon_conf_default_reflector | combine(avahi__daemon_conf_reflector)) }}\n{{ print_config('rlimits', avahi__daemon_conf_default_rlimits | combine(avahi__daemon_conf_rlimits)) }}\n): sequence item 27: expected str instance, int found. sequence item 27: expected str instance, int found"
}
The text was updated successfully, but these errors were encountered:
I am running into an error trying to use devops.avahi with ansible 2.15.2. I'm not sure what it is complaining about, as I am not setting any avahi int values in my host or group variables, so I'm assuming this is coming from some incompatibility with the defaults in the role and the version of ansible I am running.
These are the only avahi variables I set:
My ansible info:
And the error output with -vvvv:
The text was updated successfully, but these errors were encountered: