For loop verification from remote host

7 views
Skip to first unread message

Madhu

unread,
Mar 11, 2017, 11:21:46 AM3/11/17
to ansible...@googlegroups.com
Hi,

  I want to verify the routes getting from remote host to a local variable. Local variable have the routes in the list. Can you guys please tell me how to do it with an example? Below is my playbook with the local variable storing the routes.

    - name: Generate the routes and store in file
      set_fact:
        variable: "[{% for i in range(0,256,16) %}{% for j in range(0,256,1) %}'120.100.{{ j }}.{{ i }}',{% endfor %}{% endfor %}]"

    - name: Dump the routes
      debug: var=variable

Thanks,
Madhu
Reply all
Reply to author
Forward
0 new messages