-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
Summary
Use case : I would like to create an S3 user with a specific Access Key and secret.
Why ? I need to create the users with the same key and secret on multiple systems for a DRP scenario.
CLI command : object-store-server user create -vserver SERVER -user USER -access-key "ACCESS_KEY_ID" -secret-key "SECRET"
Proposal : add optional parameters like "access_key" and "secret_key" which would be used only if the user does not already exist.
Component Name
na_ontap_s3_users
Additional Information
- name: Generate random access_secret with length 40
ansible.builtin.set_fact:
access_secret: "{{ lookup('community.general.random_string', min_upper=1, min_special=1, override_special='_', min_numeric=1, length=40) }}"
- name: Generate random access_key with length 20
ansible.builtin.set_fact:
access_key: "{{ lookup('community.general.random_string', min_upper=1, min_special=1, override_special='_', min_numeric=1, length=20) }}"
- name: Create user with provided access keys
netapp.ontap.na_ontap_s3_users:
state: present
name: "{{ s3_admin_user }}"
vserver: "{{ vserver }}"
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
https: true
validate_certs: false
use_rest: always
access_key: "{{ access_key }}"
access_secret: {{ access_secret }}"Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels