forked from JNPRAutomate/ansible-junos-evpn-vxlan
-
Notifications
You must be signed in to change notification settings - Fork 2
/
pb.rav.token.app_stop.yaml
35 lines (33 loc) · 1004 Bytes
/
pb.rav.token.app_stop.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
- name: Get FQDN for all VM on Ravello
connection: local
hosts: all
gather_facts: no
roles:
- ravello.lib
pre_tasks:
- include_vars: "{{ topology_file }}"
tasks:
###############################
## Get VM ID ###
###############################
- name: Get App ID from Ravello
ravello_get_id:
resource_name: "{{ ravello_ci_app_name }}"
resource_type: applications
token: "{{ ravello_ci_token }}"
register: app
run_once: true
###############################
## Delete the application ##
###############################
- name: Stop Application on Ravello
uri:
url: "https://cloud.ravellosystems.com/api/v1/applications/{{ app.json.id }}/stop"
method: POST
status_code: 202
HEADER_Content-Type: 'application/json'
HEADER_Accept: 'application/json'
HEADER_X-Ephemeral-Token-Authorization: "{{ ravello_ci_token }}"
run_once: true
changed_when: true