aa74ae82657b62eadad7770708edf930fa0c42e6 — HokieGeek a month ago f062c3b v7.1.15
Trying out user location for the systemd units
1 files changed, 5 insertions(+), 1 deletions(-)

M prod/ansible.yml
M prod/ansible.yml => prod/ansible.yml +5 -1
@@ 2,6 2,10 @@ - name: Deploy teadb site
    hosts: all
    tasks:
+       - shell: "echo $HOME"
+         register: home
+       - set_fact: home_dir="{{home.stdout}}"
+       - set_fact: systemd_dir="{{home_dir}}/.config/systemd/user"
        - name: teadb | Create the config directory
          file:
            path: /etc/hgteadb


@@ 35,7 39,7 @@ - name: teadb | Add the systemd unit
          template:
            src: hgteadb.service.j2
-           dest: /etc/systemd/system/hgteadb.service
+           dest: "{{ systemd_dir }}/hgteadb.service"
            mode: 644
          become: yes
        - name: teadb | Start service