Skip to content

Commit

Permalink
Merge pull request #231 from centerforaisafety/205-migrate-nix-to-weka
Browse files Browse the repository at this point in the history
205 migrate nix to weka
  • Loading branch information
andriy-safe-ai authored Oct 30, 2023
2 parents 6f4b12e + 2e6e0a4 commit d5f458d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
18 changes: 8 additions & 10 deletions playbooks/install_nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,17 @@
state: directory
when: not dir_stat.stat.exists

- name: Mount /data/nix dir to /nix dir
- name: Bind mount /data/nix dir to /nix dir
hosts: all
gather_facts: true
become: true
tasks:
- include_role:
name: nfs-client
vars:
local_path: "/nix"
export_host: "{{ nfs_source_IP }}"
export_path: "/data/nix"
options: "{{ nfs_options }}"
lock: "none"
- mount:
path: /nix
src: /data/nix
fstype: none
opts: bind
state: mounted

- name: Link /var/run/nix and /data/nix/var/nix/daemon-socket dirs
hosts: slurm_backup
Expand Down Expand Up @@ -238,4 +236,4 @@
- name: Start the service
systemd:
name: socat-client.service
state: started
state: started
2 changes: 1 addition & 1 deletion playbooks/uninstall_nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
lineinfile:
path: /etc/fstab
state: absent
regexp: '{{ nfs_source_IP }}:\/data\/nix \/nix nfs defaults 0 0'
regexp: '\/data\/nix \/nix none bind 0 0'

- name: Remove Nix store from shared filesystem
hosts: bastion
Expand Down

0 comments on commit d5f458d

Please # to comment.