Error:
TASK [lineinfile] ***************************************************************************************************************************
fatal: [192.168.1.158]: FAILED! => {“msg”: “The task includes an option with an undefined variable. The error was: ‘list object’ has no attribute u’0’\n\nThe error appears to be in ‘/home/cloud/nidhi/ccepbook/nidhi-playbook.yml’: line 31, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - local_action: lineinfile line="{{ result.results[item].container.Config.Hostname }}" dest=/tmp/abhay.csv\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - "{{ foo }}"\n”}
- local_action: lineinfile line=“{{ result.results[item].container.Config.Hostname }}” dest=/tmp/abhay.csv
with_sequence: start=0 end=“{{ count|int }}”
here count is from 0 to 2