title: How can I enable unit templates?
body: <p>I have written a my own unit template:</p>
  
  <pre><code>/etc/systemd/user/my_service@.service
  </code></pre>
  
  <p>This is the base for a bunch of services I want to come up at boot. I do want to create each service as a symlink to the template something like this:</p>
  
  <pre><code>$ cd /etc/systemd/user
  $ sudo ln -s my_service@.service my_service@runner001.service
  $ sudo ln -s my_service@.service my_service@runner002.service
  ...
  </code></pre>
  
  <p>But if I now try to enable the services I get:</p>
  
  <pre><code>$ sudo systemctl enable my_service@runner001.service
  Failed to execute operation: Too many levels of symbolic links
  </code></pre>
  
  <p>To solve this I copied the file instead:</p>
  
  <pre><code>$ cd /etc/systemd/user
  $ sudo cp my_service@.service my_service@runner001.service
  $ sudo cp my_service@.service my_service@runner002.service
  ...
  </code></pre>
  
  <p>Now <code>systemctl enable</code> works as expected.</p>
  
  <p><strong>But:</strong> Making all those copies and keeping them synced when the template is changed are awkward and sort of defeats the purpose of a templating system I think.</p>
  
  <p>What am I missing here? Could the <em>runners</em> be enabled without copying the template?</p>
  
  <p>I'm using Ubuntu 16.04 and systemd=229</p>
  
  <hr>
  
  <p><strong>Btw</strong>: If I after enabling of the service replace it with a symlink it will still work for some <code>systemctl</code> commands (<code>daemon-reload</code>, <code>start</code>, <code>stop</code> and <code>status</code>) while <code>is-enabled</code>, <code>enable</code> and <code>disable</code> will all fail with:</p>
  
  <pre><code>Failed to execute operation: Too many levels of symbolic links
  </code></pre>
  
  <p>Strange I think, and I have not tried to reboot my system to see if that works...</p>