paste post and get

Change-Id: I7ad6f974a4dc9eb7a9c002efb13f776dab852c46
This commit is contained in:
oleksandr k 2020-03-12 20:07:56 +00:00
parent 1cbb18788e
commit dbe5259c84
1 changed files with 17 additions and 8 deletions

View File

@ -17,12 +17,21 @@
register: nodeIP
- name: post to lodget
uri:
url: http://{{ nodeIP.stdout }}:{{ nodePort.stdout }}
method: POST
body: "{{ lookup('file','mesos-consul.json') }}"
body_format: json
headers:
Content-Type: "application/json"
- name: Post the paste
command: >
curl -vv --silent -d "code=test&language=text&webpage=" http://{{ nodeIP.stdout }}:{{ nodePort.stdout }} 2>&1 |grep Location
register: pasteLocationInfo
- name: Get the pasteUrl
command: >
cut -d' ' -f3 <<<{{ pasteLocationInfo.stdout }})"
register: pasteUrl
- name: Get the paste
command: >
curl -I {{ pasteUrl.stdout }}
register: getPaste