-
Notifications
You must be signed in to change notification settings - Fork 87
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
alicloud_access_key维护提交 #88
Conversation
zhuweif seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
@@ -0,0 +1,92 @@ | |||
# This code is part of Ansible, but is an independent component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ram connect如果没有特殊的实现方式,直接写在已有的module alicloud_ecs中就好了
state: | ||
description: | ||
- 'present', 'list', 'absent' access_key | ||
choices: [ 'present','list','absent'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
list用单独的facts module实现
options: | ||
state: | ||
description: | ||
- 'present', 'list', 'absent' access_key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description写更清楚些
- The symbol to identity the access_key. | ||
is_active: | ||
description: | ||
- The access_key's status can be 'Active' or 'Inactive'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is_active使用一个bool类型就好了
''' | ||
|
||
EXAMPLES = ''' | ||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的example一定是可运行的example
''' | ||
|
||
RETURN = ''' | ||
''' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RETURN的内容呢
changed=True | ||
except Exception as e: | ||
module.fail_json(msg="Create or update access_key got an error: {0}".format(e)) | ||
module.exit_json(changed=changed, msg=result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
退出时return的内容跟RETURN定义的应该时一致的
|
||
def validate_parameters(required_vars, valid_vars, module): | ||
state = module.params.get('state') | ||
for v in required_vars: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是否required,直接在argument_spec中声明就好了
No description provided.