-
Notifications
You must be signed in to change notification settings - Fork 0
/
ovirt_login.yml
24 lines (21 loc) · 922 Bytes
/
ovirt_login.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
- block:
# Create a vault with `ovirt_password` variable which store your
# oVirt/RHV user's password, and include that yaml file with variable:
# - ansible.builtin.include_vars: /opt/ansible_home/Lexher/Infrastruktur_labbar/vars/password.yml
- name: Obtain SSO token with using username/password credentials
ovirt.ovirt.ovirt_auth:
url: https://rhvm.lexher.infra/ovirt-engine/api
username: admin@internal
ca_file: ca.pem
password: "{{ rhvm_password }}"
# Previous task generated I(ovirt_auth) fact, which you can later use
# in different modules as follows:
- ovirt.ovirt.ovirt_vm:
auth: "{{ ovirt_auth }}"
state: absent
name: myvm
always:
- name: Always revoke the SSO token
ovirt.ovirt.ovirt_auth:
state: absent
ovirt_auth: "{{ ovirt_auth }}"