Skip to content

Commit

Permalink
Github actions auto update oos templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ceshihao committed Jan 7, 2024
1 parent 235cb84 commit 42781e2
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 109 deletions.
20 changes: 10 additions & 10 deletions list-templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -970,9 +970,9 @@
"Category": "Other",
"CreatedBy": "ACS",
"CreatedDate": "2019-10-26T08:12:54Z",
"Description": "{\"en\": \"Use this template to run Ansible playbook on ECS Instance.Only supports CentOS, AliyunLinux and Ubuntu.\", \"zh-cn\": \"使用这个模板执行ECS实例中的Ansible PlayBook,仅支持CentOS,AliyunLinux和Ubuntu\", \"name-en\": \"ACS-ECS-ApplyAnsiblePlayBooks\", \"name-zh-cn\": \"在实例中执行Ansible PlayBook\", \"categories\": [\"run_command\"]}",
"Description": "{\"en\": \"Use this template to run Ansible playbook on ECS Instance.Only supports CentOS, Alibaba Cloud Linux and Ubuntu.\", \"zh-cn\": \"使用这个模板执行ECS实例中的Ansible PlayBook,仅支持CentOS,Alibaba Cloud Linux和Ubuntu\", \"name-en\": \"ACS-ECS-ApplyAnsiblePlayBooks\", \"name-zh-cn\": \"在实例中执行Ansible PlayBook\", \"categories\": [\"run_command\"]}",
"HasTrigger": false,
"Hash": "d6dec57288ff9bde995b5b47b9abd7e99daa399842b2db27c31bcc623f18bd13",
"Hash": "49cd8bbd26e71da75a5d53cc367e5f106562cfd1f57fa8a41adcff22f1617aa2",
"IsFavorite": false,
"Popularity": 5,
"ResourceGroupId": "rg-acfmz4wrjukykdy",
Expand All @@ -982,10 +982,10 @@
"TemplateId": "t-0f87c1cc974343f9b71b",
"TemplateName": "ACS-ECS-ApplyAnsiblePlayBooks",
"TemplateType": "Automation",
"TemplateVersion": "v11",
"TemplateVersion": "v12",
"TotalExecutionCount": -1,
"UpdatedBy": "ACS",
"UpdatedDate": "2021-12-29T09:54:00Z"
"UpdatedDate": "2024-01-05T05:35:33Z"
},
{
"Category": "Other",
Expand Down Expand Up @@ -2589,7 +2589,7 @@
"CreatedDate": "2021-05-19T03:43:50Z",
"Description": "{\"name-en\": \"ACS-ECS-ScheduleApplyPatchBaseline\", \"name-zh-cn\": \"定时在ECS实例中配置补丁基线\", \"en\": \"Schedule to apply patch baseline on ECS instance\", \"zh-cn\": \"定时在ECS实例中配置补丁基线\"}",
"HasTrigger": true,
"Hash": "576ae8318b42c4858948e0072726448730075de9a18808a9ec7333dcb80d2765",
"Hash": "8110a3d7e9b732a0fe9a135a1fd7b33429d3b9ad34857a89051ac1048bc57218",
"IsFavorite": false,
"Popularity": 5,
"ResourceGroupId": "",
Expand All @@ -2599,10 +2599,10 @@
"TemplateId": "t-9243f2ebc6d54f7aaf8b",
"TemplateName": "ACS-ECS-ScheduleApplyPatchBaseline",
"TemplateType": "Automation",
"TemplateVersion": "v16",
"TemplateVersion": "v18",
"TotalExecutionCount": -1,
"UpdatedBy": "ACS",
"UpdatedDate": "2023-12-12T05:57:45Z"
"UpdatedDate": "2024-01-04T09:29:53Z"
},
{
"Category": "Other",
Expand Down Expand Up @@ -4605,7 +4605,7 @@
"CreatedDate": "2023-11-24T09:36:39Z",
"Description": "{\"name-en\": \"ACS-ECS-InheritDiskTagToSnapshot\", \"name-zh-cn\": \"某个地域所有磁盘标签继承到快照\", \"en\": \"Inherit all disk tags to snapshots\", \"zh-cn\": \"某个地域所有磁盘标签继承到快照\"}",
"HasTrigger": false,
"Hash": "01c7957b206bad2d330569e18215acfa5b708f44ecee55242f758873ea0d5619",
"Hash": "206668e5c6295e5200ef16e15dba1afe3ad0b880390ae812fe88396a6c6917fb",
"IsFavorite": false,
"Popularity": 5,
"ResourceGroupId": "",
Expand All @@ -4615,10 +4615,10 @@
"TemplateId": "t-aa68cfa87b80470fac35",
"TemplateName": "ACS-ECS-InheritDiskTagToSnapshot",
"TemplateType": "Automation",
"TemplateVersion": "v2",
"TemplateVersion": "v3",
"TotalExecutionCount": -1,
"UpdatedBy": "ACS",
"UpdatedDate": "2023-11-24T09:37:57Z"
"UpdatedDate": "2024-01-04T01:36:34Z"
},
{
"Category": "Other",
Expand Down
4 changes: 2 additions & 2 deletions templates/ACS-ECS-ApplyAnsiblePlayBooks.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FormatVersion: OOS-2019-06-01
Description:
en: 'Use this template to run Ansible playbook on ECS Instance.Only supports CentOS, AliyunLinux and Ubuntu.'
zh-cn: 使用这个模板执行ECS实例中的Ansible PlayBook,仅支持CentOS,AliyunLinux和Ubuntu
en: 'Use this template to run Ansible playbook on ECS Instance.Only supports CentOS, Alibaba Cloud Linux and Ubuntu.'
zh-cn: 使用这个模板执行ECS实例中的Ansible PlayBook,仅支持CentOS,Alibaba Cloud Linux和Ubuntu
name-en: ACS-ECS-ApplyAnsiblePlayBooks
name-zh-cn: 在实例中执行Ansible PlayBook
categories:
Expand Down
18 changes: 8 additions & 10 deletions templates/ACS-ECS-InheritDiskTagToSnapshot.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FormatVersion: OOS-2019-06-01
Description:
name-en: ACS-ECS-InheritDiskTagToSnapshot
name-en: ACS-ECS-InheritDiskTagToSnapshot
name-zh-cn: 某个地域所有磁盘标签继承到快照
en: Inherit all disk tags to snapshots
zh-cn: 某个地域所有磁盘标签继承到快照
Expand Down Expand Up @@ -36,7 +36,7 @@ Parameters:
Label:
en: RateControl
zh-cn: 任务执行的并发比率
Description:
Description:
en: Concurrency rate of task execution
zh-cn: 任务执行的并发比率
Type: Json
Expand All @@ -53,8 +53,8 @@ Parameters:
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: getDisks
Action: 'ACS::ExecuteAPI'
Description:
Action: ACS::ExecuteAPI
Description:
en: Query the disk information
zh-cn: 查询磁盘信息
Properties:
Expand All @@ -65,10 +65,10 @@ Tasks:
Outputs:
disks:
Type: List
ValueSelector: '.Disks.Disk[].DiskId'
ValueSelector: .Disks.Disk[].DiskId
- Name: tagSnapshot
Action: 'ACS::ECS::InheritDiskTagToSnapshot'
Description:
Action: ACS::ECS::InheritDiskTagToSnapshot
Description:
en: Inherit the specified disk tags to snapshots
zh-cn: 将指定磁盘的标签继承到快照
Properties:
Expand All @@ -77,12 +77,10 @@ Tasks:
tagKeys: '{{tagKeys}}'
isUpdate: '{{isUpdate}}'
rateControl: '{{rateControl}}'
OOSAssumeRole: '{{OOSAssumeRole}}'
Loop:
RateControl: '{{rateControl}}'
Items: '{{getDisks.disks}}'
Outputs:
tagResult:
AggregateType: 'Fn::ListJoin'
AggregateType: Fn::ListJoin
AggregateField: reqResult

32 changes: 31 additions & 1 deletion templates/ACS-ECS-ScheduleApplyPatchBaseline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Parameters:
AllowedValues:
- ALIYUN::ECS::Instance
- ALIYUN::ECS::ManagedInstance
- ALIYUN::ECD::Desktop
Default: ALIYUN::ECS::Instance
targets:
Type: Json
Expand Down Expand Up @@ -111,7 +112,9 @@ Parameters:
en: OOSAssumeRole
zh-cn: OOS扮演的RAM角色
Type: String
Default: OOSServiceRole
Default: ''
AssociationPropertyMetadata:
TimerTrigger: '${timerTrigger}'
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: timerTrigger
Expand Down Expand Up @@ -203,6 +206,33 @@ Tasks:
commandOutput:
Type: String
ValueSelector: commandOutput
- Name: applyPatchBaselineOnECDInstance
Description:
en: Apply patch baseline on ECD instance
zh-cn: 在ECD实例中配置补丁基线
Action: ACS::ECD::ApplyPatchBaseline
When:
Fn::Equals:
- '{{ resourceType }}'
- ALIYUN::ECD::Desktop
Properties:
regionId: '{{ regionId }}'
desktopId: '{{ ACS::TaskLoopItem }}'
action: '{{ action }}'
rebootIfNeed: '{{ rebootIfNeed }}'
whetherCreateSnapshot: '{{ whetherCreateSnapshot }}'
timeout: '{{ timeout }}'
Loop:
RateControl: '{{ rateControl }}'
Items: '{{ getInstance.instanceIds }}'
Outputs:
commandOutputs:
AggregateType: Fn::ListJoin
AggregateField: commandOutput
Outputs:
commandOutput:
Type: String
ValueSelector: commandOutput
Outputs:
commandOutputs:
Type: List
Expand Down
86 changes: 0 additions & 86 deletions templates/ACS-RDS-BulkyModifyDBInstanceMaintainTime.yaml
Original file line number Diff line number Diff line change
@@ -1,86 +0,0 @@
FormatVersion: OOS-2019-06-01
Description:
en: Modifies maintain time of rds instance
zh-cn: 修改实例可维护时间段
name-en: ACS-RDS-BulkyModifyDBInstanceMaintainTime
name-zh-cn: 修改可维护时间段
categories:
- security
Parameters:
regionId:
Label:
en: RegionId
zh-cn: 地域ID
Type: String
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
instanceIds:
Label:
en: The ids of rds instance
zh-cn: 实例ID列表
Type: List
maintainTime:
Description:
en: Specify the time in the ISO 8601 standard in the HH:mmZ-HH:mmZ format. The time must be in UTC.
zh-cn: 格式:HH:mmZ-HH:mmZ(UTC时间)。
Label:
en: The maintenance time of the instance.
zh-cn: 实例的可维护时间段。
Type: String

rateControl:
Label:
en: RateControl
zh-cn: 任务执行的并发比率
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 10
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: OOS扮演的RAM角色
Type: String
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: ModifyDBInstanceMaintainTime
Action: ACS::ExecuteAPI
Description:
en: Modifies maintain time of rds instances
zh-cn: 修改可维护时间段
Properties:
Service: RDS
API: ModifyDBInstanceMaintainTime
Parameters:
RegionId: '{{ regionId }}'
DBInstanceId: '{{ ACS::TaskLoopItem }}'
MaintainTime: '{{ maintainTime }}'
Loop:
RateControl: '{{ rateControl }}'
Items: '{{ instanceIds }}'
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- maintainTime
Label:
default:
zh-cn: 设置维护时段
en: Configure Maintain Time
- Parameters:
- regionId
- instanceIds
Label:
default:
zh-cn: 选择实例
en: Select Instances
- Parameters:
- rateControl
- OOSAssumeRole
Label:
default:
zh-cn: 高级选项
en: Control Options

0 comments on commit 42781e2

Please sign in to comment.