Create the static host volume for the new NFS
Some checks failed
Ansible Linting / ansible-lint (push) Failing after 6s
Secops Linting and Safety Checks / checkov-scan-s3 (push) Failing after 17s

This commit is contained in:
shockrah 2025-06-18 17:08:00 -07:00
parent 850570faf5
commit 77590b067a
4 changed files with 35 additions and 11 deletions

9
ansible/nomad.yaml Normal file
View File

@ -0,0 +1,9 @@
---
- name: Setup all the responsibilities of the nomad server
hosts: nigel.local
remote_user: nigel
tasks:
- name: Apply the nomad role
ansible.builtin.include_role:
name: nomad

View File

@ -15,4 +15,10 @@ client {
host_volume "registry" { host_volume "registry" {
path = "/opt/volumes/registry" path = "/opt/volumes/registry"
read_only = false read_only = false
} }
host_volume "nfs" {
path = "/opt/volumes/nfs"
read_only = false
}

View File

@ -1,10 +1,18 @@
- name: Ensure the root data directory is present - name: Nomad server configuration
ansible.builtin.file: become: true
path: "{{ nomad.volumes.root }}" block:
state: directory - name: Ensure the root data directory is present
mode: "0755" ansible.builtin.file:
- name: Ensure registry volume is present path: "{{ nomad.volumes.root }}"
ansible.builtin.file: state: directory
path: "{{ nomad.volumes.registry }}" mode: "0755"
state: directory - name: Ensure registry volume is present
mode: "0755" ansible.builtin.file:
path: "{{ nomad.volumes.registry }}"
state: directory
mode: "0755"
- name: Ensure the MinIO diretory is present
ansible.builtin.file:
path: "{{ nomad.volumes.nfs }}"
state: directory
mode: "0755"

View File

@ -2,3 +2,4 @@ nomad:
volumes: volumes:
root: /opt/volumes root: /opt/volumes
registry: /opt/volumes/ncr registry: /opt/volumes/ncr
nfs: /opt/volumes/nfs