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

Error: template error while templating string: unexpected '.' #37

Open
micahlmartin opened this issue Feb 21, 2017 · 4 comments
Open

Error: template error while templating string: unexpected '.' #37

micahlmartin opened this issue Feb 21, 2017 · 4 comments

Comments

@micahlmartin
Copy link

When spinning up a test following the instructions I get this error:

TASK [provision_docker : Add docker hosts with connection docker] **************
task path: /Users/micah/code/ansible/provision_docker/tasks/inc_inventory_iface.yml:55
fatal: [localhost]: FAILED! => {
    "failed": true,
    "msg": "{'msg': u'All items completed', 'changed': False, 'results': [{'_ansible_parsed': True, '_ansible_item_result': True, u'end': u'2017-02-21 16:22:11.684872', '_ansible_no_log': False, u'stdout': u'172.17.0.2', u'cmd': [u'docker', u'inspect', u'--format', u'{{ .NetworkSettings.IPAddress }}', u'optimus'], u'rc': 0, 'invocation': {'module_name': u'command', u'module_args': {u'warn': True, u'executable': None, u'_uses_shell': False, u'_raw_params': u\"docker inspect --format '{{ .NetworkSettings.IPAddress }}' optimus\", u'removes': None, u'creates': None, u'chdir': None}}, 'item': u'optimus', u'delta': u'0:00:00.060217', u'stderr': u'', u'changed': False, '_ansible_delegated_vars': {'ansible_host': u'localhost'}, 'stdout_lines': [u'172.17.0.2'], u'start': u'2017-02-21 16:22:11.624655', u'warnings': []}]}: template error while templating string: unexpected '.'. String: docker inspect --format '{{ .NetworkSettings.IPAddress }}' optimus"
}
@chrismeyersfsu
Copy link
Owner

chrismeyersfsu commented Feb 21, 2017

Hmm, @micahlmartin can you try the same set of steps without this PR merged https://github.com/chrismeyersfsu/provision_docker/pull/36/files ?

Seems we are getting the same failure as you .. in our travis tests https://travis-ci.org/chrismeyersfsu/provision_docker

@chrismeyersfsu
Copy link
Owner

Ok, this seems to be a regression in Ansible between 2.2.0 to 2.2.1

The tests succeed on my local box with Ansible 2.2.0 but fail in the same way with Ansible 2.2.1

@micahlmartin
Copy link
Author

Yeah, 2.2.1.0 is the version I'm using.

@chrismeyersfsu
Copy link
Owner

Filed bug in Ansible core ansible/ansible#21782

petr-balogh pushed a commit to petr-balogh/provision_docker that referenced this issue Jun 18, 2018
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