We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is a template error if mirrorlist.country is absent:
mirrorlist.country
AnsibleError: template error while templating string: unexpected '}'. String: #!/bin/bash\n# {{ ansible_managed}\n#\n/usr/bin/reflector --latest 20 \\\n {% if mirrorlist.country %}--country {{ mirrorlist.country }} \\\n {% endif %}\n --sort rate \\\n --protocol https \\\n --save /etc/pacman.d/mirrorlist\n \nif [[ -f /etc/pacman.d/mirrorlist.pacnew ]]; then\n rm /etc/pacman.d/mirrorlist.pacnew\nfi\n. unexpected '}'"
I believe that the solution is something like this:
{% if mirrorlist.country is defined and mirrorlist.country %}--country {{ mirrorlist.country }} \ {% endif %}
The text was updated successfully, but these errors were encountered:
It seems that actual problem is missed closed } in # {{ ansible_managed}
}
# {{ ansible_managed}
Sorry, something went wrong.
@petRUShka : that was my mistake, thanks for catching it. Pull request sent.
No branches or pull requests
There is a template error if
mirrorlist.country
is absent:I believe that the solution is something like this:
The text was updated successfully, but these errors were encountered: