Exaclty. The error is misleading as you can see my code its straightforward {{ before item.pah. Anyways i m trying what MR. Walter has suggested. Lets c. Thanks by the way for your response.
On Monday, May 1, 2023 at 9:05:56 PM UTC+5:30 Abhijeet Kasurde wrote: > It seems that you have a typo since the error message reads '*Destination > { item.path }} does not exist !*' which is missing a starting curling > bracket. > > Your playbook works fine though. > > On Mon, May 1, 2023 at 8:25 AM Sameer Modak <sameer.m...@gmail.com> wrote: > >> Code==> >> >> - name: insert logggin file in log4j protperties >> >> lineinfile: >> >> path: '{{ item.path }}' >> >> insertafter: >> 'log4j.appender.kafkaAppender.layout.ConversionPattern=*' >> >> line: '{{ item.line }}' >> >> with_items: >> >> - { path: '/etc/kafka/confluent-6.2.10/kafka/log4j.properties', line: >> 'log4j.appender.kafkaAppender.MaxFileSize=512MB' } >> >> - { path: '/etc/kafka/confluent-7.2.5/kafka/log4j.properties', line: >> 'log4j.appender.kafkaAppender.MaxFileSize=512MB' } >> >> - { path: '/etc/kafka/confluent-6.2.10/kafka/log4j.properties', line: >> 'log4j.appender.kafkaAppender.MaxBackupIndex=10' } >> >> - { path: '/etc/kafka/confluent-7.2.5/kafka/log4j.properties', line: >> 'log4j.appender.kafkaAppender.MaxBackupIndex=10' } >> >> >> ERROR==>>> >> >> item={'path': '/etc/kafka/confluent-7.2.5/zookeeper/log4j.properties', >> 'line': 'log4j.appender.kafkaAppender.MaxBackupIndex=10'}) => >> {"ansible_loop_var": "item", "changed": false, "item": {"line": >> "log4j.appender.kafkaAppender.MaxBackupIndex=10", "path": >> "/etc/kafka/confluent-7.2.5/zookeeper/log4j.properties"}, "msg": >> "Destination { item.path }} does not exist !", "rc": 257} >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ansible Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to ansible-proje...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/f34a22cb-eaee-41b0-9573-5c09dc7b9517n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ansible-project/f34a22cb-eaee-41b0-9573-5c09dc7b9517n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > Thanks, > Abhijeet Kasurde > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/342b4d38-bb63-413e-8836-d3bb6e27a41dn%40googlegroups.com.