chrismeyersfsu / provision_docker

Test Ansible roles and playbooks using Docker
221 stars 56 forks source link

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

Open micahlmartin opened 7 years ago

micahlmartin commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

Yeah, 2.2.1.0 is the version I'm using.

chrismeyersfsu commented 7 years ago

Filed bug in Ansible core https://github.com/ansible/ansible/issues/21782