Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve(ram): Add ram module #227

Merged
merged 1 commit into from
Feb 21, 2020
Merged

improve(ram): Add ram module #227

merged 1 commit into from
Feb 21, 2020

Conversation

lixue323
Copy link
Contributor

@lixue323 lixue323 commented Jan 2, 2020

No description provided.

state:
description:
- If I(state=present), access key will be created.
- If I(state=present) and user_access_key_id exists, access key will be updated.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ak一旦创建了就没法修改

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

�更新ak是更新他的状态, 文档UpdateAccessKey中是这么写的。AccessKey的状态,取值为Active或Inactive。

version_added: "2.9"
short_description: Create, Delete, Update Ram login profile in Alibaba Cloud.
description:
- Create, Delete, Update Ram login profile in Alibaba Cloud.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

更新的时候,有那么个字段来保证唯一

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个module保证唯一的字段就是用户名,为哪个用户创建的

- name: Changed. Create login profile
ali_ram_login_profile:
user_name: ansible
password: Test12345_!@
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

以后password的内容展示都改为 YourPassword

description=dict(type='str'),
user_name=dict(type='str'),
group_name=dict(type='str'),
role_name=dict(type='str'),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这是在干啥

- name: Changed. Create policy
ali_ram_policy:
policy_name: ansible_oss
policy_document: {{ policy }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个最好有一个实际的例子展示document

- If I(state=absent), and role_name exists, will detach policy from role.
choices: ['present', 'absent']
default: 'present'
policy_document:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个policy_document不能修改么?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- name: Changed. Create a role
ali_ram_role:
role_name: ansible
policy: '{"Statement": [{"Action": "sts:AssumeRole","Effect": "Allow","Principal": {"Service": ["rds.aliyuncs.com"]}}],"Version": "1"}'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

哪有policy这个字段

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assume_role_policy_document aliases=['policy']

new_email:
description:
- The new email address of the RAM user.
new_comments:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

除了new_user_name,我理解其他的new_xxx 都不需要啊


DOCUMENTATION = """
---
module: ali_sts
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个module不用吧

@xiaozhu36 xiaozhu36 merged commit cb450f6 into alibaba:master Feb 21, 2020
@lixue323 lixue323 deleted the ram branch March 1, 2020 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants