corbins

Untitled

Feb 28th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. template with jinja2_native = False
  2.  
  3. {
  4. "vtc_config":{
  5. "vtc_data":"do_not_delete",
  6. "cli": "enable",
  7. "vdn_only":"0",
  8. "log_dir": "",
  9. "log_filter": "4",
  10. "log_master_only": "enabled",
  11. "walled_garden_check":"enabled",
  12. "domains":[
  13. {"name":"domain1",
  14. "dps_list":[
  15. {% for host in groups['dps'] %}
  16. {"ip":"{{ hostvars[host].network[0].ipv4[0].ip }}","config_port":"{{ client_port }}"}{% if not loop.last %},{% endif %}{{ "\n" }}
  17. {%- endfor %}
  18. ]
  19. }
  20. ]
  21. }
  22. }
  23.  
  24. template with jinja2_native = True
  25.  
  26. {'vtc_config': {'cli': 'enable', 'log_filter': '4', 'vdn_only': '0', 'log_dir': '', 'walled_garden_check': 'enabled', 'domains': [{'name': 'domain1', 'dps_list': [{'ip': '192.168.2.10', 'config_port': '49001'}, {'ip': '192.168.2.20', 'config_port': '49001'}, {'ip': '192.168.2.30', 'config_port': '49001'}]}], 'vtc_data': 'do_not_delete', 'log_master_only': 'enabled'}}
Add Comment
Please, Sign In to add comment