-
Notifications
You must be signed in to change notification settings - Fork 1
/
common.yml
39 lines (34 loc) · 1.07 KB
/
common.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
- name: include metadata.json vars
include_vars:
file: "{{ ocp.assets_dir }}/metadata.json"
name: metadata
when: profile != 'ipi'
- name: Include ocp ovirt conf variables
include_vars:
file: "{{ ocp.ovirt_config_path }}"
name: ocp_ovirt
- name: Set engine facts
set_fact:
infra:
basedomain: "{{ ocp_ovirt.ovirt_fqdn.split('.')[1:] | join('.') }}"
engine:
hostname: "{{ ocp_ovirt.ovirt_fqdn.split('.')[0] }}"
ipaddr: "{{ ovirt.engine_ipaddr }}"
- name: Set ovirt CA file path
set_fact:
ovirt_ca_file: "/tmp/ca_file"
when: (ocp_ovirt.ovirt_ca_bundle is defined)
- name: Write cafile
copy:
content: "{{ ocp_ovirt.ovirt_ca_bundle }}"
dest: "{{ ovirt_ca_file }}"
force: no
when: ovirt_ca_file is defined
- name: Login to oVirt engine
ovirt_auth:
url: "{{ ocp_ovirt.ovirt_url}}"
username: "{{ ocp_ovirt.ovirt_username }}"
password: "{{ ocp_ovirt.ovirt_password }}"
ca_file: "{{ ovirt_ca_file | default(omit) }}"
insecure: "{{ ocp_ovirt.insecure | default(False) }}"
register: ovirt_loggedin