Skip to content

Commit

Permalink
Group working directory scripts after reboot
Browse files Browse the repository at this point in the history
  • Loading branch information
mebays committed Nov 13, 2024
1 parent f81d9fa commit b5d3c29
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions templates/al2/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,41 @@
{
"type": "shell",
"remote_folder": "{{ user `remote_folder`}}",
"inline": [
"mkdir -p {{user `working_dir`}}",
"mkdir -p {{user `working_dir`}}/log-collector-script"
"script": "{{template_dir}}/provisioners/install-additional-repos.sh",
"environment_vars": [
"ADDITIONAL_YUM_REPOS={{user `additional_yum_repos`}}"
]
},
{
"type": "shell",
"remote_folder": "{{ user `remote_folder`}}",
"script": "{{template_dir}}/provisioners/install-additional-repos.sh",
"script": "{{template_dir}}/provisioners/upgrade-kernel.sh",
"environment_vars": [
"ADDITIONAL_YUM_REPOS={{user `additional_yum_repos`}}"
"KUBERNETES_VERSION={{user `kubernetes_version`}}",
"KERNEL_VERSION={{user `kernel_version`}}"
]
},
{
"type": "shell",
"remote_folder": "{{ user `remote_folder`}}",
"script": "{{template_dir}}/provisioners/enable-fips.sh",
"environment_vars": [
"ENABLE_FIPS={{user `enable_fips`}}"
]
},
{
"type": "shell",
"remote_folder": "{{ user `remote_folder`}}",
"inline": ["sudo reboot"],
"expect_disconnect": true,
"pause_after": "90s"
},
{
"type": "shell",
"remote_folder": "{{ user `remote_folder`}}",
"inline": [
"mkdir -p {{user `working_dir`}}",
"mkdir -p {{user `working_dir`}}/log-collector-script"
]
},
{
Expand All @@ -161,30 +185,6 @@
"sudo mv {{user `working_dir`}}/bin/* /usr/bin/"
]
},
{
"type": "shell",
"remote_folder": "{{ user `remote_folder`}}",
"script": "{{template_dir}}/provisioners/upgrade-kernel.sh",
"environment_vars": [
"KUBERNETES_VERSION={{user `kubernetes_version`}}",
"KERNEL_VERSION={{user `kernel_version`}}"
]
},
{
"type": "shell",
"remote_folder": "{{ user `remote_folder`}}",
"script": "{{template_dir}}/provisioners/enable-fips.sh",
"environment_vars": [
"ENABLE_FIPS={{user `enable_fips`}}"
]
},
{
"type": "shell",
"remote_folder": "{{ user `remote_folder`}}",
"inline": ["sudo reboot"],
"expect_disconnect": true,
"pause_after": "90s"
},
{
"type": "shell",
"remote_folder": "{{ user `remote_folder`}}",
Expand Down

0 comments on commit b5d3c29

Please sign in to comment.