---

- become: true
  block:
    - name: install slurm from rpm files
      dnf:
        name:
          - "{{ slurmbuilddir }}/rpmbuild/RPMS/x86_64/slurm-20.02.2-1.el8.x86_64.rpm"
          - "{{ slurmbuilddir }}/rpmbuild/RPMS/x86_64/slurm-slurmd-20.02.2-1.el8.x86_64.rpm"
    - name: fix slurmd pidfile path in systemd unit
      replace:
        path: /usr/lib/systemd/system/slurmd.service
        regexp: var/run/slurmd.pid
        replace: /var/run/slurm/slurmd.pid

    - name: enable slurmd service
      systemd:
        daemon_reload: true  # necessary because we edited the unit file
        name: slurmd
        state: started
        enabled: true

---

- become: true
  block:
    - name: install slurm from rpm files
      dnf:
        name:
          - "{{ slurmbuilddir }}/rpmbuild/RPMS/x86_64/slurm-20.02.2-1.el8.x86_64.rpm"
          - "{{ slurmbuilddir }}/rpmbuild/RPMS/x86_64/slurm-slurmd-20.02.2-1.el8.x86_64.rpm"
    - name: fix slurmd pidfile path in systemd unit
      replace:
        path: /usr/lib/systemd/system/slurmd.service
        regexp: var/run/slurmd.pid
        replace: /var/run/slurm/slurmd.pid

    - name: enable slurmd service
      systemd:
        daemon_reload: true  # necessary because we edited the unit file
        name: slurmd
        state: started
        enabled: true

    - name: mount /data
      ansible.posix.mount:
        path: /data
        src: {{kive_db_host}}:/data
        fstype: nfs
        state: mounted

    - name: mount /opt
      ansible.posix.mount:
        path: /opt
        src: {{kive_db_host}}:/opt
        fstype: nfs
        state: mounted
        opts: ro

    - name: mount /usr/local
      ansible.posix.mount:
        path: /usr/local
        src: {{kive_db_host}}:/usr/local
        fstype: nfs
        state: mounted
        opts: ro

Add head node's network drives to ansible.
Add head node's network drives to ansible.
