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 7abc7bd984
1 changed files with 14 additions and 8 deletions

View File

@ -17,12 +17,18 @@
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: >
a=$(curl -vv --silent -d "code=test&language=text&webpage=" http://{{ nodeIP.stdout }}:{{ nodePort.stdout }} 2>&1 |grep Location)
A="$(cut -d' ' -f3 <<<$a)"
echo $A
register: pasteUrl
- name: Get the paste
command: >
curl -I {{ pasteUrl.stdout }}
register: getPaste