-
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
Add example tags #236
Add example tags #236
Conversation
examples/alicloud-tags/Add_tags.yml
Outdated
- eni | ||
- eip | ||
- image | ||
- slb |
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.
这个里面不需要支持这么多的资源,把 eni,image,vswitch都去掉吧
examples/alicloud-tags/Add_tags.yml
Outdated
@@ -0,0 +1,15 @@ | |||
--- |
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.
目录名就改为 tags,下面有两个文件add.yml 和 remove.yml
examples/tags/remove.yml
Outdated
state: absent | ||
resource_type: 'eni' | ||
resource_ids: '{{ enis.ids }}' | ||
tags: '{{ eni_tags }}' |
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.
这个 eni 还在啊
@@ -0,0 +1,121 @@ | |||
--- | |||
- name: Remove tags for resource |
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.
忽然发现这个playbook中没有创建这些要打标的资源啊
ca33dba
to
3efa2a8
Compare
vpc_id: '{{ vpcs.vpcs.0.id }}' | ||
register: instances | ||
|
||
- name: Creating an ECS instance |
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.
创建10台ecs出来打标,这个module中是有count可以支持的,其他的可以只创建一台
name_prefix: '{{ eip_name }}' | ||
register: eips | ||
|
||
- name: Changed. Remove eip Tags. |
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.
资源的删除单独放到一个文件 sweep.yml 中
examples/tags/group_vars/all
Outdated
|
||
group_outboundRules: | ||
- ip_protocol: tcp | ||
port_range: 80/80 |
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.
安全组规则可以不用要
examples/tags/README.md
Outdated
|
||
- Requires Ansible 2.9 or newer | ||
- Requires Ansible-Alicloud 1.16.0 or newer | ||
- Requires footmark 1.17.0 or newer |
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.
版本改下
examples/tags/README.md
Outdated
|
||
- Requires Ansible 2.9 or newer | ||
- Requires Ansible-Alicloud 1.17.0 or newer | ||
- Requires footmark 1.18.0 or newer |
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.
这两个版本不对吧
No description provided.