I am using jinja2 expressions to iterate a 40 lines list. Basically my objective is, how do I iterate first 10 lines In first column and there after another 10 lines in second column?
Thanks, Gopal On Thu, 26 Dec 2019, 21:22 Stefan Hornburg (Racke), <[email protected]> wrote: > On 12/26/19 10:51 AM, Gopal Chatla wrote: > > I've created a variable from stdout_lines and the contents are copied > into a file through blockinfile module along with > > jinja template for loop. > > > > The for loop iterates 40 lines. But how do add new line after every 10 > lines in jinja template for loop. Like a excel > > sheet. > > > > Thanks, Gopal > > Please elaborate on what is your real objective. Without any further > information it seems quite futile to me to guess > your problem. > > Regards > Racke > > > > > On Mon, 23 Dec 2019, 23:38 alicia, <[email protected] <mailto: > [email protected]>> wrote: > > > > There are already several filters for text - maybe an existing one > would do what you need? You can look > > at > https://docs.ansible.com/ansible/devel/user_guide/playbooks_filters.html for > some pointers. > > > > Hope this helps, > > Alicia > > > >> On Dec 23, 2019, at 8:11 AM, Vladimir Botka <[email protected] > <mailto:[email protected]>> wrote: > >> > >> On Mon, 23 Dec 2019 17:56:07 +0530 > >> Gopal Chatla <[email protected] <mailto:[email protected]>> > wrote: > >> > >>> Is there any way to include python script in ansible playbook for > string > >>> alignments? > >> > >> Try "Filter plugins" > >> > https://docs.ansible.com/ansible/latest/dev_guide/developing_plugins.html#filter-plugins > >> > >> Cheers, > >> > >> -vlado > >> > >> -- > >> 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 > >> [email protected] <mailto: > ansible-project%[email protected]>. > >> To view this discussion on the web visit > >> > https://groups.google.com/d/msgid/ansible-project/20191223151103.3f9e60e4%40gmail.com > . > > > > -- > > 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 > > [email protected] <mailto: > [email protected]>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/ansible-project/CAAAxneczwYbky9axjhYtTSCo6_B-udFChps44UVkX4nzvz00Yg%40mail.gmail.com > > < > https://groups.google.com/d/msgid/ansible-project/CAAAxneczwYbky9axjhYtTSCo6_B-udFChps44UVkX4nzvz00Yg%40mail.gmail.com?utm_medium=email&utm_source=footer > >. > > > -- > Ecommerce and Linux consulting + Perl and web application programming. > Debian and Sympa administration. Provisioning with Ansible. > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/a7bb4ee5-a574-8108-49d5-66709f9673f5%40linuxia.de > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAAAxneekJhkFNunsYaAPdCaXdK_5YQmtJA7fAy7kGx-KNPT0gQ%40mail.gmail.com.
