ops(ansible): prepare rootless app deployment

Create the application user's Ansible temporary directory and rely on the Quadlet install configuration for service enablement.
This commit is contained in:
cole-maxwell1
2026-08-07 15:31:51 -05:00
parent 94d18ff8e2
commit 7bbb5b08f9
+8 -9
View File
@@ -8,6 +8,14 @@
ansible.builtin.set_fact:
app_user_uid: "{{ ansible_facts.getent_passwd[app_user][1] }}"
- name: Create application user Ansible temporary directory
ansible.builtin.file:
path: "/home/{{ app_user }}/.ansible/tmp"
state: directory
owner: "{{ app_user }}"
group: "{{ app_user }}"
mode: "0700"
- name: Create Quadlet directory
ansible.builtin.file:
path: "/home/{{ app_user }}/.config/containers/systemd"
@@ -60,12 +68,3 @@
environment:
XDG_RUNTIME_DIR: "/run/user/{{ app_user_uid }}"
changed_when: false
- name: Enable application service without starting it
ansible.builtin.command:
argv: [systemctl, --user, enable, app-todo.service]
become_user: "{{ app_user }}"
environment:
XDG_RUNTIME_DIR: "/run/user/{{ app_user_uid }}"
register: app_enable
changed_when: "'Created symlink' in app_enable.stderr"