podman and nomad stuff

This commit is contained in:
2024-12-11 13:37:02 +01:00
parent d91d85d01d
commit cefb1e3a38
5 changed files with 104 additions and 5 deletions

View File

@@ -0,0 +1,24 @@
###
# Ansible
##
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
# Full configuration options can be found at https://www.nomadproject.io/docs/configuration
data_dir = "/opt/nomad/data"
bind_addr = "{{ ansible_facts['default_ipv4']['address'] }}"
datacenter = "nummer5"
server {
enabled = true
bootstrap_expect = 3
}
client {
enabled = true
servers = ["{{ ansible_facts['default_ipv4']['address'] }}"]
network_interface = "{{ ansible_facts['default_ipv4']['interface'] }}"
node_pool = "{{ nomad_pool }}"
}

View File

@@ -4,3 +4,17 @@
name: name:
- nomad - nomad
- nomad-driver-podman - nomad-driver-podman
- name: Configure Nomad telemetry
register: conf_update
copy:
src: telemetry.hcl
dest: /etc/nomad.d/telemetry.hcl
- name: Configure Nomad
register: conf_update
template:
src: files/nomad.hcl.j2
dest: /tmp/nomad.hcl

View File

@@ -179,7 +179,7 @@ mountopt = "nodev"
# If the thinpool is in use when the driver attempts to remove it, the driver # If the thinpool is in use when the driver attempts to remove it, the driver
# tells the kernel to remove it as soon as possible. Note this does not free # tells the kernel to remove it as soon as possible. Note this does not free
# up the disk space, use deferred deletion to fully remove the thinpool. # up the disk space, use deferred deletion to fully remove the thinpool.
# use_deferred_removal = "True" use_deferred_removal = "True"
# use_deferred_deletion marks thinpool device for deferred deletion. # use_deferred_deletion marks thinpool device for deferred deletion.
# If the device is busy when the driver attempts to delete it, the driver # If the device is busy when the driver attempts to delete it, the driver
@@ -187,7 +187,7 @@ mountopt = "nodev"
# If the program using the driver exits, the driver will continue attempting # If the program using the driver exits, the driver will continue attempting
# to cleanup the next time the driver is used. Deferred deletion permanently # to cleanup the next time the driver is used. Deferred deletion permanently
# deletes the device and all data stored in device will be lost. # deletes the device and all data stored in device will be lost.
# use_deferred_deletion = "True" use_deferred_deletion = "True"
# xfs_nospace_max_retries specifies the maximum number of retries XFS should # xfs_nospace_max_retries specifies the maximum number of retries XFS should
# attempt to complete IO when ENOSPC (no space) error is returned by # attempt to complete IO when ENOSPC (no space) error is returned by

View File

@@ -8,6 +8,7 @@
- containernetworking-plugins - containernetworking-plugins
- crun - crun
- fuse-overlayfs - fuse-overlayfs
- slirp4netns
- name: Disable Docker Emulation warning - name: Disable Docker Emulation warning
file: file:
@@ -22,6 +23,11 @@
dest: /etc/containers/containers.conf dest: /etc/containers/containers.conf
src: containers.conf src: containers.conf
- name: Configure storage.conf
copy:
dest: /etc/containers/storage.conf
src: storage.conf
- name: Configure cr.wks registry - name: Configure cr.wks registry
copy: copy:
dest: /etc/containers/registries.conf.d/cr.wks.conf dest: /etc/containers/registries.conf.d/cr.wks.conf

View File

@@ -5,7 +5,9 @@
- role: common - role: common
tags: common tags: common
- hosts: ~pine.*\.wks - hosts: pine01.wks
vars:
nomad_pool: sys
roles: roles:
- role: nummer5 - role: nummer5
tags: nummer5 tags: nummer5
@@ -13,3 +15,56 @@
tags: armbian tags: armbian
- role: debian - role: debian
tags: debian tags: debian
- hosts: pine02.wks
vars:
nomad_pool: apps
roles:
- role: nummer5
tags: nummer5
- role: armbian
tags: armbian
- role: debian
tags: debian
- hosts: pine03.wks
vars:
nomad_pool: apps
roles:
- role: nummer5
tags: nummer5
- role: armbian
tags: armbian
- role: debian
tags: debian
- hosts: pine04.wks
vars:
nomad_pool: apps
roles:
- role: nummer5
tags: nummer5
- role: armbian
tags: armbian
- role: debian
tags: debian
- hosts: pine05.wks
vars:
nomad_pool: sys
roles:
- role: nummer5
tags: nummer5
- role: armbian
tags: armbian
- role: debian
tags: debian
#- hosts: ~pine.*\.wks
# roles:
# - role: nummer5
# tags: nummer5
# - role: armbian
# tags: armbian
# - role: debian
# tags: debian