Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - hosts: localhost
- gather_facts: yes
- vars:
- wanted_int: "21999"
- wanted_replace: "\"port\": {{ wanted_int }} "
- foo:
- name: mcap-svc1 # provides a server to consul
- id: mcap-svc1
- consul_service_state: present
- token: 39fooooooooooooooooooo
- checks:
- - name: "HTTP on Port 80"
- method: "GET"
- http: "http://localhost:80"
- interval: "5s"
- timeout: "1s"
- success_before_passing: 3
- failures_before_critical: 3
- enable_tag_override: false
- port: 80
- tags:
- - foo
- - bar
- connect:
- sidecar_service:
- port: "PLACE_HOLDER"
- tasks:
- - name: set fact
- set_fact:
- foo2:
- service: "{{ foo | to_json }}"
- - name: testing0
- debug:
- msg: "{{ wanted_replace }}"
- - name: testing
- debug:
- msg: "{{foo2 | replace('\"port\": \"PLACE_HOLDER\"', wanted_replace ) }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement