Skip to content

Commit

Permalink
Update vmware_resourcelimits.yml
Browse files Browse the repository at this point in the history
Updated to one call
  • Loading branch information
Britton, Nicholas authored and Britton, Nicholas committed Dec 15, 2019
1 parent cd17c13 commit ce0853a
Showing 1 changed file with 9 additions and 50 deletions.
59 changes: 9 additions & 50 deletions snippets/ansible/vmware_resourcelimits.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,30 @@


---
- name: vmware resource limits - vCenter
- name: vmware resource limits
uri:
url: "{{baseurl}}config/resource-limits"
method: POST
body_format: json
status_code: 201
status_code: 204
headers:
authorization: "{{login.json.token}}"
content-type: application/vnd.netbackup+json;version=3.0
body:
data:
type: resource-limits
- type: resource-limits
id: vmware
attributes:
resources:
resourceType: vCenter
- resourceType: vCenter
resourceLimit: 50
validate_certs: no
return_content: yes
register: vmware_resource
- name: debug vmware_resource
debug:
msg: "{{vmware_resource}}"

- name: vmware resource limits - ESXserver
uri:
url: "{{baseurl}}config/resource-limits"
method: POST
body_format: json
status_code: 201
headers:
authorization: "{{login.json.token}}"
content-type: application/vnd.netbackup+json;version=3.0
body:
data:
type: resource-limits
attributes:
resources:
resourceType: ESXserver
- resourceType: ESXserver
resourceLimit: 2
validate_certs: no
return_content: yes
register: vmware_resource
- name: debug vmware_resource
debug:
msg: "{{vmware_resource}}"

- name: vmware resource limits - Datastore
uri:
url: "{{baseurl}}config/resource-limits"
method: POST
body_format: json
status_code: 201
headers:
authorization: "{{login.json.token}}"
content-type: application/vnd.netbackup+json;version=3.0
body:
data:
type: resource-limits
attributes:
resources:
resourceType: Datastore
- resourceType: Datastore
resourceLimit: 2

validate_certs: no
return_content: yes
register: vmware_resource
- name: debug vmware_resource
debug:
msg: "{{vmware_resource}}"

0 comments on commit ce0853a

Please sign in to comment.