Re: [ansible-project] String alignments

2019-12-27 Thread Stefan Hornburg (Racke)
On 12/27/19 10:57 AM, Gopal Chatla wrote: > 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  > Do you mind to share your playbook / t

Re: [ansible-project] String alignments

2019-12-27 Thread Gopal Chatla
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), wrote: > On 12/26/19 10:51 AM, Gopal Chatla w

Re: [ansible-project] String alignments

2019-12-26 Thread Stefan Hornburg (Racke)
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 fo

Re: [ansible-project] String alignments

2019-12-26 Thread Gopal Chatla
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 On Mon, 23 D

Re: [ansible-project] String alignments

2019-12-23 Thread alicia
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, Ali

Re: [ansible-project] String alignments

2019-12-23 Thread Vladimir Botka
On Mon, 23 Dec 2019 17:56:07 +0530 Gopal Chatla 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

[ansible-project] String alignments

2019-12-23 Thread Gopal Chatla
Hi Team, I am redirecting debug messages output to a '' Txt" file using jinja2 templating alignment( by replacing extra strings ). Basically I want to send that file contents to email but output is not looking decent. Is there any way to include python script in ansible playbook for string alignm