-
Notifications
You must be signed in to change notification settings - Fork 12
/
appliance_claim.yml
27 lines (27 loc) · 1.11 KB
/
appliance_claim.yml
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
---
- hosts: "{{ target | default('all') }}"
connection: local
gather_facts: false
vars:
api_info: &api_info
api_private_key: "{{ api_private_key | default('/Users/dsoper/Downloads/TMEIntersightSecretKey.txt') }}"
api_key_id: "{{ api_key_id | default('5c6077537564612d300f2dbd/5c61a4437564612d300f3995/5c61a7e07564612d300f3da5') }}"
api_uri: "{{ api_uri | default('https://intersight.tmedemo.cisco.com/api/v1') }}"
validate_certs: "{{ validate_certs | default('false') }}"
username: "{{ ucs_username | default('admin') }}"
password: "{{ ucs_password | default('password') }}"
platform: "{{ platform_type | default('UCSFI') }}"
tasks:
- name: Claim device on the appliance
intersight_rest_api:
<<: *api_info
resource_path: /appliance/DeviceClaims
query_params:
$filter: "Hostname eq '{{ inventory_hostname }}'"
api_body: {
"Username": "{{ username }}",
"Password": "{{ password }}",
"Hostname": "{{ inventory_hostname }}",
"PlatformType": "{{ platform }}"
}
delegate_to: localhost