Update nomad/docker to include arm64 builds
This commit is contained in:
parent
265589790e
commit
b845d6bc51
6 changed files with 25 additions and 12 deletions
2
ansible/roles/docker/defaults/main.yml
Normal file
2
ansible/roles/docker/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
docker_arch: amd64
|
|
@ -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
|
||||
|
|
2
ansible/roles/nomad_client/defaults/main.yml
Normal file
2
ansible/roles/nomad_client/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
nomad_arch: amd64
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
...
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue