diff --git a/ansible/nuc.yaml b/ansible/nuc.yaml index 12eb585..81f1f7d 100644 --- a/ansible/nuc.yaml +++ b/ansible/nuc.yaml @@ -7,5 +7,6 @@ - setup - nomad - proxy + - volumes ansible.builtin.include_role: name: local-server-head diff --git a/ansible/roles/local-server-head/tasks/main.yaml b/ansible/roles/local-server-head/tasks/main.yaml index d2898f0..373f75d 100644 --- a/ansible/roles/local-server-head/tasks/main.yaml +++ b/ansible/roles/local-server-head/tasks/main.yaml @@ -30,4 +30,12 @@ apply: become: true tags: - - proxy \ No newline at end of file + - proxy +- name: Setup data directory for the nomad host volumes + tags: volumes + ansible.builtin.include_tasks: + file: nomad-host-volumes.yaml + apply: + become: true + tags: + - volumes \ No newline at end of file diff --git a/ansible/roles/local-server-head/tasks/nomad-host-volumes.yaml b/ansible/roles/local-server-head/tasks/nomad-host-volumes.yaml new file mode 100644 index 0000000..b6932c0 --- /dev/null +++ b/ansible/roles/local-server-head/tasks/nomad-host-volumes.yaml @@ -0,0 +1,8 @@ +- name: Ensure the root data directory is present + ansible.builtin.file: + path: "{{ host_vol_root }}" + state: directory +- name: Ensure registry volume is present + ansible.builtin.file: + path: "{{ host_vol_root }}/ncr" + state: directory \ No newline at end of file diff --git a/ansible/roles/local-server-head/vars/main.yaml b/ansible/roles/local-server-head/vars/main.yaml index e69de29..43dce24 100644 --- a/ansible/roles/local-server-head/vars/main.yaml +++ b/ansible/roles/local-server-head/vars/main.yaml @@ -0,0 +1 @@ +host_vol_root: /opt/volumes \ No newline at end of file