Browse Source

Merge pull request #3143 from jbcraig/add_os_trust_id

add support for openstack trust to cloud provider config
pull/3280/head
Aivars Sterns 6 years ago
committed by GitHub
parent
commit
34019291b8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions
  1. 11
      roles/kubernetes/node/tasks/openstack-credential-check.yml
  2. 4
      roles/kubernetes/node/templates/openstack-cloud-config.j2

11
roles/kubernetes/node/tasks/openstack-credential-check.yml

@ -21,5 +21,12 @@
- name: check openstack_tenant_id value
fail:
msg: "openstack_tenant_id is missing"
when: openstack_tenant_id is not defined or openstack_tenant_id == ""
msg: "one of openstack_tenant_id or openstack_trust_id must be specified"
when: (openstack_tenant_id is not defined or openstack_tenant_id == "") and
openstack_trust_id is not defined
- name: check openstack_trust_id value
fail:
msg: "one of openstack_tenant_id or openstack_trust_id must be specified"
when: (openstack_trust_id is not defined or openstack_trust_id == "") and
openstack_tenant_id is not defined

4
roles/kubernetes/node/templates/openstack-cloud-config.j2

@ -3,7 +3,11 @@ auth-url="{{ openstack_auth_url }}"
username="{{ openstack_username }}"
password="{{ openstack_password }}"
region="{{ openstack_region }}"
{% if openstack_trust_id is defined and openstack_trust_id != "" %}
trust-id="{{ openstack_trust_id }}"
{% else %}
tenant-id="{{ openstack_tenant_id }}"
{% endif %}
{% if openstack_tenant_name is defined and openstack_tenant_name != "" %}
tenant-name="{{ openstack_tenant_name }}"
{% endif %}

Loading…
Cancel
Save