[Unit] Description=Slurm queue daemon After=slurmdbd.service Wants=slurmdbd.service [Service] TimeoutStartSec=0 Restart=always ExecStartPre=-/usr/bin/docker stop %n ExecStartPre=-/usr/bin/docker rm %n #Run daemon in the forground. systemd and docker do the daemonizing. ExecStart=/usr/bin/docker run --hostname {{ ansible_fqdn }} --rm --name %n \ --network host \ --volume /srv/slurm/volumes/var/spool/slurm:/var/spool/slurm \ --volume /srv/slurm/volumes/etc/slurm:/etc/slurm \ --volumes-from munge.service \ hpc/slurm /runslurmctld.sh [Install] WantedBy=multi-user.target