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
|
- name: add docker repo
|
||||||
apt_repository:
|
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
|
state: present
|
||||||
mode: 0600
|
mode: 0644
|
||||||
|
|
||||||
|
- name: update apt cache
|
||||||
|
apt:
|
||||||
- name: install docker-ce
|
- name: install docker-ce
|
||||||
apt:
|
apt:
|
||||||
state: present
|
state: present
|
||||||
|
update_cache: True
|
||||||
name:
|
name:
|
||||||
- docker-ce
|
- docker-ce
|
||||||
- docker-ce-cli
|
- 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
|
- name: get nomad
|
||||||
unarchive:
|
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/
|
dest: /usr/local/bin/
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: root
|
owner: root
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
|
|
||||||
- name: get nomad podman plugins
|
- name: get nomad podman plugins
|
||||||
unarchive:
|
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/
|
dest: /opt/nomad_plugins/
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: nomad
|
owner: nomad
|
||||||
|
|
|
@ -14,14 +14,17 @@
|
||||||
|
|
||||||
- name: ensure podman is installed
|
- name: ensure podman is installed
|
||||||
apt:
|
apt:
|
||||||
name: "podman={{ podman_version }}"
|
name:
|
||||||
|
- fuse-overlayfs
|
||||||
|
- "podman={{ podman_version }}"
|
||||||
|
- uidmap
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: ensure podman socket is configured
|
- name: enable podman
|
||||||
copy:
|
systemd:
|
||||||
src: files/podman.socket
|
name: podman
|
||||||
dest: /etc/systemd/system/podman.socket
|
state: started
|
||||||
owner: root
|
enabled: True
|
||||||
group: root
|
daemon_reload: True
|
||||||
mode: 0755
|
changed_when: False
|
||||||
...
|
...
|
||||||
|
|
|
@ -38,4 +38,7 @@ plugin_dir = "/opt/nomad_plugins"
|
||||||
|
|
||||||
plugin "nomad-driver-podman" {
|
plugin "nomad-driver-podman" {
|
||||||
enabled = true
|
enabled = true
|
||||||
|
config {
|
||||||
|
socket_path = "unix:///run/user/1000/podman/podman.sock"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue