Skip to content
This repository has been archived by the owner on Jun 17, 2021. It is now read-only.

Commit

Permalink
Fix ternary operator in ovirt_auth
Browse files Browse the repository at this point in the history
Change-Id: I3dc45f9364c74bbbe1b35ec3a31b85cf995e2614
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1584772
Signed-off-by: Ondra Machacek <omachace@redhat.com>
  • Loading branch information
machacekondra committed Jul 13, 2018
1 parent 39ab524 commit 7391d68
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tasks/main.yml
@@ -1,11 +1,15 @@
---
- block:
- set_fact:
engine_url: 'https://' ~engine_fqdn~ '/ovirt-engine/api'
when: engine_fqdn is defined

- name: Login to oVirt engine
ovirt_auth:
username: "{{ engine_user | default(lookup('env','OVIRT_USERNAME')) | default(omit) }}"
password: "{{ engine_password | default(lookup('env','OVIRT_PASSWORD')) | default(omit) }}"
url: "{{ (engine_fqdn is defined) | default(lookup('env','OVIRT_URL')) | ternary('https://' ~engine_fqdn~ '/ovirt-engine/api', omit) }}"
ca_file: "{{ engine_cafile | default(lookup('env','OVIRT_CAFILE')) | default(omit) }}"
username: "{{ engine_user | default(lookup('env', 'OVIRT_USERNAME')) | default(omit) }}"
password: "{{ engine_password | default(lookup('env', 'OVIRT_PASSWORD')) | default(omit) }}"
url: "{{ engine_url | default(lookup('env', 'OVIRT_URL')) | default(omit) }}"
ca_file: "{{ engine_cafile | default(lookup('env', 'OVIRT_CAFILE')) | default(omit) }}"
insecure: "{{ engine_cafile is undefined }}"
tags:
- always
Expand Down

0 comments on commit 7391d68

Please sign in to comment.