Skip to content
New issue

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

ansible-playbook deploy-nginx-web-server.yml -e "inventory=192.168.2.14" #7

Open
z3473 opened this issue Feb 25, 2022 · 1 comment
Open

Comments

@z3473
Copy link

z3473 commented Feb 25, 2022

Describe the bug

A clear and concise description of what the bug is.

To reproduce

Steps to reproduce the behavior:

  1. Deploy NGINX collection using playbook.yml
  2. View output/logs/configuration on '...'
  3. See error

Expected behavior

A clear and concise description of what you expected to happen.

Your environment

  • Version of the NGINX collection or specific commit
  • Version of Ansible
  • Version of Jinja2 (if you are using any templating capability)
  • Target deployment platform

Additional context

Add any other context about the problem here.
failed: [192.168.2.14] (item={u'config': {u'servers': [{u'core': {u'server_name': u'localhost', u'listen': [{u'port': 80}]}, u'sub_filter': {u'sub_filters': [{u'string': u'server_hostname', u'replacement': u'$hostname'}, {u'string': u'server_address', u'replacement': u'$server_addr:$server_port'}, {u'string': u'server_url', u'replacement': u'$request_uri'}, {u'string': u'remote_addr', u'replacement': u'$remote_addr:$remote_port'}, {u'string': u'server_date', u'replacement': u'$time_local'}, {u'string': u'client_browser', u'replacement': u'$http_user_agent'}, {u'string': u'request_id', u'replacement': u'$request_id'}, {u'string': u'nginx_version', u'replacement': u'$nginx_version'}, {u'string': u'document_root', u'replacement': u'$document_root'}, {u'string': u'proxied_for_ip', u'replacement': u'$http_x_forwarded_for'}], u'once': False}, u'log': {u'access': [{u'path': u'/var/log/nginx/access.log', u'format': u'main'}]}, u'locations': [{u'core': {u'index': u'index.html', u'root': u'/usr/share/nginx/html'}, u'location': u'/'}]}]}, u'template_file': u'http/default.conf.j2', u'deployment_location': u'/etc/nginx/conf.d/default.conf'}) => {"ansible_loop_var": "item", "changed": false, "item": {"config": {"servers": [{"core": {"listen": [{"port": 80}], "server_name": "localhost"}, "locations": [{"core": {"index": "index.html", "root": "/usr/share/nginx/html"}, "location": "/"}], "log": {"access": [{"format": "main", "path": "/var/log/nginx/access.log"}]}, "sub_filter": {"once": false, "sub_filters": [{"replacement": "$hostname", "string": "server_hostname"}, {"replacement": "$server_addr:$server_port", "string": "server_address"}, {"replacement": "$request_uri", "string": "server_url"}, {"replacement": "$remote_addr:$remote_port", "string": "remote_addr"}, {"replacement": "$time_local", "string": "server_date"}, {"replacement": "$http_user_agent", "string": "client_browser"}, {"replacement": "$request_id", "string": "request_id"}, {"replacement": "$nginx_version", "string": "nginx_version"}, {"replacement": "$document_root", "string": "document_root"}, {"replacement": "$http_x_forwarded_for", "string": "proxied_for_ip"}]}}]}, "deployment_location": "/etc/nginx/conf.d/default.conf", "template_file": "http/default.conf.j2"}, "msg": "TemplateAssertionError: no test named 'boolean'"}

@alessfg
Copy link
Collaborator

alessfg commented Feb 25, 2022

Hey there!

You are running an outdated version of Jinja2. Try updating to the latest release and everything should work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants