-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhpe_oneview_get_srv_prof_templ.yml
48 lines (38 loc) · 1.56 KB
/
hpe_oneview_get_srv_prof_templ.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
- hosts: target_hosts
gather_facts: no
tasks:
# - name: Gather facts about all Scopes
# hpe.oneview.oneview_scope_facts:
# hostname: "{{ hostvars[oneview_host].ansible_host }}"
# username: "{{ oneview_username }}"
# password: "{{ oneview_password }}"
# auth_login_domain: "{{ oneview_domain }}"
# api_version: "{{ oneview_apiversion }}"
# delegate_to: localhost
- name: Gather facts about all Server Profile Templates
hpe.oneview.oneview_server_profile_template_facts:
hostname: "{{ hostvars[oneview_host].ansible_host }}"
username: "{{ oneview_username }}"
password: "{{ oneview_password }}"
auth_login_domain: "{{ oneview_domain }}"
api_version: "{{ oneview_apiversion }}"
delegate_to: localhost
- name: Print out all facts about all profile templates
debug:
var: server_profile_templates
- name: Server Profile Template name which we search
debug:
var: server_profile_template_name
- name: Get a server profile template for target serves
hpe.oneview.oneview_server_profile_template_facts:
hostname: "{{ hostvars[oneview_host].ansible_host }}"
username: "{{ oneview_username }}"
password: "{{ oneview_password }}"
auth_login_domain: "{{ oneview_domain }}"
api_version: "{{ oneview_apiversion }}"
name: "{{ server_profile_template_name }}"
delegate_to: localhost
- name: Print out all facts about server profile template
debug:
var: server_profile_templates