Commit c7e434e3 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

packer: add Ubuntu 22.04 image generation in playbook

parent f8902fbd
......@@ -48,7 +48,6 @@
- { name: "vm-bootstrap", size: "50", script: "scripts/vm-bootstrap.sh"}
- { name: "vm-bootstrap", size: "25", script: "scripts/vm-bootstrap.sh"}
- shell: PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' ubuntu-20.04-server-amd64.json >> log/ubuntu-20.04-server-amd64-{{ item.name }}.log
args:
creates: output-ubuntu-20.04-server-{{ item.size }}G-{{ item.name }}
......@@ -57,6 +56,14 @@
- { name: "vm-bootstrap", size: "50", script: "scripts/vm-bootstrap.sh"}
- { name: "vm-bootstrap", size: "25", script: "scripts/vm-bootstrap.sh"}
- shell: PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' ubuntu-22.04-server-amd64.json >> log/ubuntu-22.04-server-amd64-{{ item.name }}.log
args:
creates: output-ubuntu-22.04-server-{{ item.size }}G-{{ item.name }}
with_items:
- { name: "vm-bootstrap", size: "200", script: "scripts/vm-bootstrap.sh"}
- { name: "vm-bootstrap", size: "50", script: "scripts/vm-bootstrap.sh"}
- { name: "vm-bootstrap", size: "25", script: "scripts/vm-bootstrap.sh"}
- shell: PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' centos-8.json >> log/centos8-{{ item.name }}.log
args:
......@@ -123,6 +130,15 @@
- { name: "vm-bootstrap", size: "25"}
ignore_errors: True
- shell: gzip output-ubuntu-22.04-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-22.04-server-{{ item.size }}G-{{ item.name }}
args:
creates: output-ubuntu-22.04-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-22.04-server-{{ item.size }}G-{{ item.name }}.gz
with_items:
- { name: "vm-bootstrap", size: "200"}
- { name: "vm-bootstrap", size: "50"}
- { name: "vm-bootstrap", size: "25"}
ignore_errors: True
- shell: gzip output-centos8-{{ item.size }}G-{{ item.name }}/packer-centos8-{{ item.size }}G-{{ item.name }}
args:
creates: output-centos8-{{ item.size }}G-{{ item.name }}/packer-centos8-{{ item.size }}G-{{ item.name }}.gz
......@@ -172,6 +188,9 @@
- { name: "vm-bootstrap", size: "200", distro: "ubuntu-20.04-server"}
- { name: "vm-bootstrap", size: "50", distro: "ubuntu-20.04-server"}
- { name: "vm-bootstrap", size: "25", distro: "ubuntu-20.04-server"}
- { name: "vm-bootstrap", size: "200", distro: "ubuntu-22.04-server"}
- { name: "vm-bootstrap", size: "50", distro: "ubuntu-22.04-server"}
- { name: "vm-bootstrap", size: "25", distro: "ubuntu-22.04-server"}
#### End of build SHA512SUM.txt and MD5SUM.txt
#### Start uploading to shacache
......@@ -209,6 +228,9 @@
- { name: "vm-bootstrap", size: "200", distro: "ubuntu-20.04-server"}
- { name: "vm-bootstrap", size: "50", distro: "ubuntu-20.04-server"}
- { name: "vm-bootstrap", size: "25", distro: "ubuntu-20.04-server"}
- { name: "vm-bootstrap", size: "200", distro: "ubuntu-22.04-server"}
- { name: "vm-bootstrap", size: "50", distro: "ubuntu-22.04-server"}
- { name: "vm-bootstrap", size: "25", distro: "ubuntu-22.04-server"}
when: shacache_config.stat.exists == True and upload_shacache == "yes"
#### End of uploading to shacache
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment