Skip to content

Commit

Permalink
Invoke _update_packages recipe instead of a shell provisioner.
Browse files Browse the repository at this point in the history
The current shell provisioner only updates the apt repo metadata about
available upgrades, without actually installing them. We already have
the _update_packages recipe that does this the right way, so adding that
to the chef-solo provisioner's run list.

Signed-off-by: Raghu Raja <[email protected]>
  • Loading branch information
rajachan committed Jan 6, 2018
1 parent b30e57e commit 5f3ed72
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 16 deletions.
1 change: 1 addition & 0 deletions packer_alinux.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"skip_install" : "true",
"execute_command" : "sudo chef-client -z --no-color -c {{.ConfigPath}} -j {{.JsonPath}}",
"run_list" : [
"cfncluster::_update_packages",
"cfncluster::default"
]
},
Expand Down
1 change: 1 addition & 0 deletions packer_centos6.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"skip_install" : "true",
"execute_command" : "sudo chef-client -z --no-color -c {{.ConfigPath}} -j {{.JsonPath}}",
"run_list" : [
"cfncluster::_update_packages",
"cfncluster::default"
]
},
Expand Down
1 change: 1 addition & 0 deletions packer_centos7.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"skip_install" : "true",
"execute_command" : "sudo chef-client -z --no-color -c {{.ConfigPath}} -j {{.JsonPath}}",
"run_list" : [
"cfncluster::_update_packages",
"cfncluster::default"
]
},
Expand Down
9 changes: 1 addition & 8 deletions packer_ubuntu1404.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@
}
],
"provisioners" : [
{
"type" : "shell",
"inline" : [
"sudo apt-cache search build-essential",
"sudo apt-get clean",
"sudo apt-get update"
]
},
{
"type" : "shell",
"inline" : [
Expand Down Expand Up @@ -124,6 +116,7 @@
"skip_install" : "true",
"execute_command" : "sudo chef-client -z --no-color -c {{.ConfigPath}} -j {{.JsonPath}}",
"run_list" : [
"cfncluster::_update_packages",
"cfncluster::default"
]
},
Expand Down
9 changes: 1 addition & 8 deletions packer_ubuntu1604.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@
}
],
"provisioners" : [
{
"type" : "shell",
"inline" : [
"sudo apt-cache search build-essential",
"sudo apt-get clean",
"sudo apt-get update"
]
},
{
"type" : "shell",
"inline" : [
Expand Down Expand Up @@ -124,6 +116,7 @@
"skip_install" : "true",
"execute_command" : "sudo chef-client -z --no-color -c {{.ConfigPath}} -j {{.JsonPath}}",
"run_list" : [
"cfncluster::_update_packages",
"cfncluster::default"
]
},
Expand Down

0 comments on commit 5f3ed72

Please sign in to comment.