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 b84a57fc5b
commit 25379afe2e

View File

@@ -37,6 +37,16 @@
mode: "0755" mode: "0755"
when: "'sway' in (desktop_sessions_enabled | default([]))" 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 - name: Configure xdg-desktop-portal backend preferences for sway
tags: [packages, services, sway, portal] tags: [packages, services, sway, portal]
ansible.builtin.copy: ansible.builtin.copy: