Skip to content

Commit

Permalink
Use swift fixed auth url
Browse files Browse the repository at this point in the history
  • Loading branch information
bigjools committed Jan 25, 2017
1 parent f360c1b commit 31ef36a
Showing 1 changed file with 43 additions and 16 deletions.
59 changes: 43 additions & 16 deletions tasks/ironic_post_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,32 +37,59 @@
tags:
- always

- name: Post swift tempURL secret key
#- name: Post swift tempURL secret key
# command: >
# {{ ironic_bin }}/swift {{ keystone_service_adminuri_insecure | bool | ternary('--insecure','') }}
# --os-username "service:{{ glance_service_user_name }}"
# --os-password "{{ glance_service_password }}"
# --os-auth-url {{ keystone_service_internalurl }}
# --os-identity-api-version {{ keystone_service_internalurl.split('/v')[-1] }}
# post -m temp-url-key:{{ ironic_swift_temp_url_secret_key }}
# environment:
# OS_ENDPOINT_TYPE: internalURL
# when:
# - inventory_hostname == groups['ironic_all'][0]
# - not ironic_standalone | bool
# tags:
# - always

- name: Post Swift tempURL secret key via standalone auth
command: >
{{ ironic_bin }}/swift {{ keystone_service_adminuri_insecure | bool | ternary('--insecure','') }}
--os-username "service:{{ glance_service_user_name }}"
--os-password "{{ glance_service_password }}"
--os-auth-url {{ keystone_service_internalurl }}
--os-identity-api-version {{ keystone_service_internalurl.split('/v')[-1] }}
post -m temp-url-key:{{ ironic_swift_temp_url_secret_key }}
environment:
OS_ENDPOINT_TYPE: internalURL
{{ ironic_bin }}/swift {{ keystone_service_adminuri_insecure | bool | ternary('--insecure,') }}
-A {{ swift_auth_url }}
- -U {{ swift_admin_user }}
-K {{ swift_admin_password }}
post -m temp-url-key:{{ ironic_swift_temp_url_secret_key }}
when:
- inventory_hostname == groups['ironic_all'][0]
- not ironic_standalone | bool
tags:
- always

- name: Get swift account
#- name: Get swift account
# shell: >
# {{ ironic_bin }}/swift {{ keystone_service_adminuri_insecure | bool | ternary('--insecure','') }}
# --os-username "service:{{ glance_service_user_name }}"
# --os-password "{{ glance_service_password }}"
# --os-auth-url {{ keystone_service_internalurl }}
# --os-identity-api-version {{ keystone_service_internalurl.split('/v')[-1] }}
# stat -v | awk '/StorageURL\:/ {print $2}'
# environment:
# OS_ENDPOINT_TYPE: internalURL
# register: swift_storage_url
# when:
# - (ironic_swift_auth_account is undefined) or (ironic_swift_endpoint is undefined)
# - not ironic_standalone | bool
# tags:
# - always

- name: Get swift account via standalone auth
shell: >
{{ ironic_bin }}/swift {{ keystone_service_adminuri_insecure | bool | ternary('--insecure','') }}
--os-username "service:{{ glance_service_user_name }}"
--os-password "{{ glance_service_password }}"
--os-auth-url {{ keystone_service_internalurl }}
--os-identity-api-version {{ keystone_service_internalurl.split('/v')[-1] }}
-A {{ swift_auth_url }}
-U {{ swift_admin_user }}
-K {{ swift_admin_password }}
stat -v | awk '/StorageURL\:/ {print $2}'
environment:
OS_ENDPOINT_TYPE: internalURL
register: swift_storage_url
when:
- (ironic_swift_auth_account is undefined) or (ironic_swift_endpoint is undefined)
Expand Down

0 comments on commit 31ef36a

Please sign in to comment.