File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed
Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -5,12 +5,26 @@ package_upgrade: true
55
66packages:
77 - curl
8+ - docker-ce
89 - git
910 - zsh
1011
12+ apt:
13+ preserve_sources_list: true
14+ sources:
15+ docker.list:
16+ source: "deb [arch=amd64] https://download.docker.com/linux/${distrib} ${codename} stable"
17+ keyid: 0EBFCD88
18+
1119runcmd:
1220# install Oh My ZSH
1321 - 'git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git /root/.oh-my-zsh'
1422 - 'cp /root/.oh-my-zsh/templates/zshrc.zsh-template /root/.zshrc'
1523 - 'sed -i "s/ZSH_THEME=\".*\"/ZSH_THEME=\"ys\"/" /root/.zshrc'
1624 - 'chsh -s /usr/bin/zsh'
25+
26+ power_state:
27+ delay: "now"
28+ mode: reboot
29+ message: Reboot after system upgrade
30+ condition: True
Original file line number Diff line number Diff line change @@ -13,10 +13,16 @@ resource "scaleway_server" "node" {
1313 image = " ${ data . scaleway_image . image . id } "
1414 type = " ${ var . server_type } "
1515 dynamic_ip_required = true
16+ boot_type = " local"
1617}
1718
1819data "template_file" "userdata" {
1920 template = " ${ file (" ${ path . module } /cloud-init-user-data" )} "
21+
22+ vars {
23+ distrib = " ${ var . docker_distrib } "
24+ codename = " ${ var . docker_distrib_codename } "
25+ }
2026}
2127
2228resource "scaleway_user_data" "ud" {
Original file line number Diff line number Diff line change @@ -22,3 +22,13 @@ variable "server_type" {
2222 type = " string"
2323 default = " START1-S"
2424}
25+
26+ variable "docker_distrib" {
27+ type = " string"
28+ default = " ubuntu"
29+ }
30+
31+ variable "docker_distrib_codename" {
32+ type = " string"
33+ default = " bionic"
34+ }
You can’t perform that action at this time.
0 commit comments