Skip to content

Commit b5f7eb3

Browse files
Rexrexcsn
authored andcommitted
Add retries to packer package install provisioners
* Add max_retries=5 to Packer provisioners that install OS packages to mitigate networking issue in China Signed-off-by: Rex <[email protected]>
1 parent 1b0e56e commit b5f7eb3

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

amis/packer_alinux2.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@
161161
"type" : "shell",
162162
"inline" : [
163163
"sudo yum -y groupinstall development && sudo yum -y install curl wget jq"
164-
]
164+
],
165+
"max_retries" : 5
165166
},
166167
{
167168
"type" : "file",

amis/packer_centos7.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@
189189
"type" : "shell",
190190
"inline" : [
191191
"sudo yum -y groupinstall development && sudo yum -y install curl wget jq"
192-
]
192+
],
193+
"max_retries" : 5
193194
},
194195
{
195196
"type" : "file",

amis/packer_centos8.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@
189189
"type" : "shell",
190190
"inline" : [
191191
"sudo dnf -y groupinstall development && sudo dnf -y install curl wget jq"
192-
]
192+
],
193+
"max_retries" : 5
193194
},
194195
{
195196
"type" : "file",

amis/packer_ubuntu1804.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,15 @@
176176
"sudo apt-cache search build-essential",
177177
"sudo apt-get clean",
178178
"sudo apt update -y"
179-
]
179+
],
180+
"max_retries" : 5
180181
},
181182
{
182183
"type" : "shell",
183184
"inline" : [
184185
"sudo apt-get -y install build-essential curl wget jq"
185-
]
186+
],
187+
"max_retries" : 5
186188
},
187189
{
188190
"type" : "file",

amis/packer_ubuntu2004.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,15 @@
176176
"sudo apt-cache search build-essential",
177177
"sudo apt-get clean",
178178
"sudo apt update -y"
179-
]
179+
],
180+
"max_retries" : 5
180181
},
181182
{
182183
"type" : "shell",
183184
"inline" : [
184185
"sudo apt-get -y install build-essential curl wget jq"
185-
]
186+
],
187+
"max_retries" : 5
186188
},
187189
{
188190
"type" : "file",

0 commit comments

Comments
 (0)