Hi, I've stumbled upon strange behviour, any ideas what am I doing wrong?
let's say I have variables like this: hosts: hostnameA.tld: min_id: 0 max_id: 5 hostnameB.tld: min_id: 6 max_id: 11 and then if I use them in task (templatE) with_sequence, I get correct result - name: 'xxxxx' template: src: 'service_xx.conf.j2' dest: '{{ some_dir }}/service_{{ "%02d" | format(item | int) }}.conf' vars: service_id: '{{ item }}' with_sequence: start={{ hosts[inventory_hostname]['min_id'] }} end={{ hosts[inventory_hostname]['max_id'] }} this will make files with 00-05 on hostnameA.tld and 06-11 on hostnameB.tld. but if I use them with include_role like this: - name: 'yyyyy' include_role: name: 'some-role' vars: service_id: '{{ "%02d" | format(item | int) }}' with_sequence: start={{ hosts[inventory_hostname]['min_id'] }} end={{ hosts[inventory_hostname]['max_id'] }} the role is run with parameter 00-11 for both machines. Any idea why? Thanks in advance, Gh. -- 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 post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/07d9cf47-996e-4405-a046-1f4fbe24db02%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.