Create the static host volume for the new NFS
This commit is contained in:
parent
850570faf5
commit
77590b067a
9
ansible/nomad.yaml
Normal file
9
ansible/nomad.yaml
Normal 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
|
||||
|
@ -16,3 +16,9 @@ host_volume "registry" {
|
||||
path = "/opt/volumes/registry"
|
||||
read_only = false
|
||||
}
|
||||
|
||||
host_volume "nfs" {
|
||||
path = "/opt/volumes/nfs"
|
||||
read_only = false
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,18 @@
|
||||
- name: Ensure the root data directory is present
|
||||
ansible.builtin.file:
|
||||
path: "{{ nomad.volumes.root }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
- name: Ensure registry volume is present
|
||||
ansible.builtin.file:
|
||||
path: "{{ nomad.volumes.registry }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
- name: Nomad server configuration
|
||||
become: true
|
||||
block:
|
||||
- name: Ensure the root data directory is present
|
||||
ansible.builtin.file:
|
||||
path: "{{ nomad.volumes.root }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
- name: Ensure registry volume is present
|
||||
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"
|
||||
|
@ -2,3 +2,4 @@ nomad:
|
||||
volumes:
|
||||
root: /opt/volumes
|
||||
registry: /opt/volumes/ncr
|
||||
nfs: /opt/volumes/nfs
|
||||
|
Loading…
Reference in New Issue
Block a user