Comments (3)
Understood, thanks!
Will create an internal ticket to look at uplifting the na_sg_org_info module to provide this capability.
from netapp.storagegrid.
@devasmith can you clarify some details about this request...
When you say "impersonating an account" in the GUI, this still logging into a particular tenancy with specific credentials right?
In the proposed playbook you're looping over the list of tenants and getting a token for each, so this makes sense. But then you want to collect access keys for the root user of each tenancy. These wouldn't exist though if you've only just created the tenancy? Additionally, the API doesn't return s3 key details after they're created so it wouldn't be possible to read the key like this.
The other issue I see is in the last task for creating an s3 key for users - the API doesn't allow explicitly setting an access key ID when creating a key. This is system generated instead.
from netapp.storagegrid.
@joshedmonds thanks for getting back to me.
Yes that is correct.
I've solved this with the uri module as shown below.
- name: Gather access keys information from root user
ansible.builtin.uri:
url: "{{ grid_admin_base_url }}/api/v3/org/users/00000000-0000-0000-0000-000000000000/s3-access-keys"
headers:
Authorization: "Bearer {{ item.0.json.data }}"
accept: application/json
method: get
body_format: json
check_mode: false
register: sg_root_access_keys
loop_control:
label: "{{ item.1.name }}"
loop: "{{ auth.results | zip(sg_tenants) | list }}"
- name: Create s3 keys on root user for our tenant if no keys exists
netapp.storagegrid.na_sg_org_user_s3_key:
api_url: "{{ grid_admin_base_url }}"
auth_token: "{{ item.0.json.data }}"
state: present
unique_user_name: "{{ sg_unique_user_name }}"
register: sg_s3keys
loop: "{{ auth.results | zip(sg_root_access_keys.results, sg_tenants) | list }}"
loop_control:
label: "{{ item.2.name }}"
when: not item.1.json.data | length > 0
The issue that I wanted to get away from was to not generate a new access key if one already exists.
from netapp.storagegrid.
Related Issues (20)
- Create and modify Traffic Classification Policies HOT 4
- Configure the ha_group parameter of na_sg_grid_gateway to accept IDs of HA groups HOT 2
- Ansible Contributor Summit. Tuesday, April 12, 2022.
- Action required: Add stable-2.13 to the test matrix HOT 2
- Provide Load balancer endpoints and HA-groups in Info-Module
- HA-group module does not support checkmode
- Create read-only-groups in grid and tenant
- New Modules for ILM, endpoint domain names, proxy, grid-options and mail-setup and also add the according information to info-module
- Storage grid tenant description HOT 3
- S3 select
- Consider using true/false for all booleans in docs
- Add module for updating StorageGrid like na_ontap_software_update
- Unmaintained collection: Removal from Ansible (community) package HOT 4
- Unmaintained collection: Removal from Ansible Certified Content program HOT 6
- Example of na_sg_grid_account.py is confusing HOT 2
- Load balancer endpoint certificates are uploaded to an incorrect endpoint HOT 3
- Update Bucket Compliance Mode to Object Lock HOT 1
- Modifying na_sg_org_group does not update s3_policy when managing management_policy simultaneously
- Important information for collection maintainers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netapp.storagegrid.