Update nomad/docker to include arm64 builds

This commit is contained in:
Amarpreet Minhas 2021-08-15 21:30:56 -04:00
parent 265589790e
commit b845d6bc51
6 changed files with 25 additions and 12 deletions

View file

@ -0,0 +1,2 @@
---
docker_arch: amd64

View file

@ -17,13 +17,16 @@
- name: add docker repo
apt_repository:
repo: deb [arch=amd64] https://download.docker.com/linux/debian buster stable
repo: "deb [arch={{ docker_arch }}] https://download.docker.com/linux/debian bullseye stable"
state: present
mode: 0600
mode: 0644
- name: update apt cache
apt:
- name: install docker-ce
apt:
state: present
update_cache: True
name:
- docker-ce
- docker-ce-cli

View file

@ -0,0 +1,2 @@
---
nomad_arch: amd64

View file

@ -42,7 +42,7 @@
- name: get nomad
unarchive:
src: "https://releases.hashicorp.com/nomad/{{ nomad_version }}/nomad_{{ nomad_version }}_linux_amd64.zip"
src: "https://releases.hashicorp.com/nomad/{{ nomad_version }}/nomad_{{ nomad_version }}_linux_{{ nomad_arch }}.zip"
dest: /usr/local/bin/
mode: 0755
owner: root
@ -78,7 +78,7 @@
- name: get nomad podman plugins
unarchive:
src: "https://releases.hashicorp.com/nomad-driver-podman/{{ nomad_podman_driver_version }}/nomad-driver-podman_{{ nomad_podman_driver_version }}_linux_amd64.zip"
src: "https://releases.hashicorp.com/nomad-driver-podman/{{ nomad_podman_driver_version }}/nomad-driver-podman_{{ nomad_podman_driver_version }}_linux_{{ nomad_arch }}.zip"
dest: /opt/nomad_plugins/
mode: 0755
owner: nomad

View file

@ -14,14 +14,17 @@
- name: ensure podman is installed
apt:
name: "podman={{ podman_version }}"
name:
- fuse-overlayfs
- "podman={{ podman_version }}"
- uidmap
state: present
- name: ensure podman socket is configured
copy:
src: files/podman.socket
dest: /etc/systemd/system/podman.socket
owner: root
group: root
mode: 0755
- name: enable podman
systemd:
name: podman
state: started
enabled: True
daemon_reload: True
changed_when: False
...

View file

@ -38,4 +38,7 @@ plugin_dir = "/opt/nomad_plugins"
plugin "nomad-driver-podman" {
enabled = true
config {
socket_path = "unix:///run/user/1000/podman/podman.sock"
}
}