Browse Source

dsvm: Run service-user tests under keystoneauth

Change-Id: I5b0ae0b78d37a31928e0b34a1b6118802a3a8236
changes/62/731362/1
Tim Burke 1 year ago
parent
commit
60f052f69a
  1. 73
      roles/additional-keystone-users/tasks/main.yaml

73
roles/additional-keystone-users/tasks/main.yaml

@ -59,3 +59,76 @@
option: s3_secret_key3
value: s3-secret3
become: true
- name: Create service role
shell: >
openstack --os-auth-url http://localhost/identity
--os-project-domain-id default --os-project-name admin
--os-user-domain-id default --os-username admin
--os-password secretadmin
role create swift_service
- name: Create service project
shell: >
openstack --os-auth-url http://localhost/identity
--os-project-domain-id default --os-project-name admin
--os-user-domain-id default --os-username admin
--os-password secretadmin
project create swiftprojecttest5
- name: Create service user
shell: >
openstack --os-auth-url http://localhost/identity
--os-project-domain-id default --os-project-name admin
--os-user-domain-id default --os-username admin
--os-password secretadmin
user create --project swiftprojecttest5 swiftusertest5 --password testing5
- name: Assign service role
shell: >
openstack --os-auth-url http://localhost/identity
--os-project-domain-id default --os-project-name admin
--os-user-domain-id default --os-username admin
--os-password secretadmin
role add --project swiftprojecttest5 --user swiftusertest5 swift_service
- name: Add service_roles to proxy-server.conf
ini_file:
path: /etc/swift/proxy-server.conf
section: filter:keystoneauth
option: SERVICE_KEY_service_roles
value: swift_service
become: true
- name: Update reseller prefixes in proxy-server.conf
ini_file:
path: /etc/swift/proxy-server.conf
section: filter:keystoneauth
option: reseller_prefix
value: AUTH, SERVICE_KEY
become: true
- name: Add service account to test.conf
ini_file:
path: /etc/swift/test.conf
section: func_test
option: account5
value: swiftprojecttest5
become: true
- name: Add service user to test.conf
ini_file:
path: /etc/swift/test.conf
section: func_test
option: username5
value: swiftusertest5
become: true
- name: Add service password to test.conf
ini_file:
path: /etc/swift/test.conf
section: func_test
option: password5
value: testing5
become: true
- name: Add service prefix to test.conf
ini_file:
path: /etc/swift/test.conf
section: func_test
option: service_prefix
value: SERVICE_KEY
become: true
Loading…
Cancel
Save