sway: create /etc/xdg/xdg-desktop-portal before writing portal config

The portal config copy assumed the parent directory existed, but on a
fresh install xdg-desktop-portal hasn't shipped it yet. Add an explicit
file directory task ahead of the copy so the playbook is robust on
hosts that don't already have it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Fabio Scotto di Santolo
2026-05-16 23:49:50 +02:00
parent a2c0c69e7b
commit 4638178c23

View File

@@ -37,6 +37,16 @@
mode: "0755"
when: "'sway' in (desktop_sessions_enabled | default([]))"
- name: Ensure /etc/xdg/xdg-desktop-portal exists
tags: [packages, services, sway, portal]
ansible.builtin.file:
path: /etc/xdg/xdg-desktop-portal
state: directory
owner: root
group: root
mode: "0755"
when: "'sway' in (desktop_sessions_enabled | default([]))"
- name: Configure xdg-desktop-portal backend preferences for sway
tags: [packages, services, sway, portal]
ansible.builtin.copy: