Advertisement
eric-sysmin

Untitled

Nov 3rd, 2016
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.85 KB | None | 0 0
  1. ---
  2. - hosts: localhost
  3.   vars:
  4.     cs_rules: []
  5.     cs_array: []
  6.     cs_items:
  7.       - match_str:
  8.        - wireless
  9.         - mobile
  10.         pool: gary_pool4_MOBILE
  11.         name: mobile-rule
  12.       - match_str:
  13.        - test
  14.         pool: gary_pool4_test
  15.         name: test-rule
  16.     rule_template:
  17.       - index: "{{ item.0 }}"
  18.         enable: true
  19.         name: "{{ item.1.name }}"
  20.         match:
  21.           path:
  22.             match_case: INSENSITIVE
  23.             match_str: "{{ item.1.match_str }}"
  24.             match_criteria: CONTAINS
  25.         switching_action:
  26.           action: HTTP_SWITCHING_SELECT_POOL
  27.           status_code: HTTP_LOCAL_RESPONSE_STATUS_CODE_200
  28.           pool_ref: "/api/pool?name={{ item.1.pool }}"
  29.   tasks:
  30.     - name: Create Content switching rule
  31.       debug: msg={{ rule_template }}
  32.       with_indexed_items: cs_items
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement