forked from openstack/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Depends-On: https://review.opendev.org/#/c/571021/ Change-Id: I3ac3288cd61b745ce7dbf2bded8eade026d0418f
- Loading branch information
Showing
4 changed files
with
103 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
- name: Set S3 endpoint | ||
ini_file: | ||
path: /etc/swift/test.conf | ||
section: func_test | ||
option: s3_storage_url | ||
value: http://localhost:8080 | ||
become: true | ||
|
||
- name: Create primary S3 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 | ||
credential create --type ec2 --project swiftprojecttest1 swiftusertest1 | ||
'{"access": "s3-user1", "secret": "s3-secret1"}' | ||
- name: Add primary S3 user to test.conf | ||
ini_file: | ||
path: /etc/swift/test.conf | ||
section: func_test | ||
option: s3_access_key | ||
value: s3-user1 | ||
become: true | ||
- name: Add primary S3 user secret to test.conf | ||
ini_file: | ||
path: /etc/swift/test.conf | ||
section: func_test | ||
option: s3_secret_key | ||
value: s3-secret1 | ||
become: true | ||
|
||
- name: Clear secondary S3 user from test.conf | ||
ini_file: | ||
path: /etc/swift/test.conf | ||
section: func_test | ||
option: s3_access_key2 | ||
value: "" | ||
become: true | ||
|
||
- name: Create restricted S3 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 | ||
credential create --type ec2 --project swiftprojecttest1 swiftusertest3 | ||
'{"access": "s3-user3", "secret": "s3-secret3"}' | ||
- name: Add restricted S3 user to test.conf | ||
ini_file: | ||
path: /etc/swift/test.conf | ||
section: func_test | ||
option: s3_access_key3 | ||
value: s3-user3 | ||
become: true | ||
- name: Add restricted S3 user secret to test.conf | ||
ini_file: | ||
path: /etc/swift/test.conf | ||
section: func_test | ||
option: s3_secret_key3 | ||
value: s3-secret3 | ||
become: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ | |
- test-setup | ||
- ensure-tox | ||
- dsvm-additional-middlewares | ||
- additional-keystone-users |