--- - name: 📦 Install nextcloud-client package_install: id: nextcloud-desktop - name: 🎬 Initialize dotlinker mapping list ansible.builtin.set_fact: nextcloud_dotlinker_mappings: [] - name: 🔨 Build dotlinker mappings for Nextcloud folders ansible.builtin.set_fact: nextcloud_dotlinker_mappings: >- {{ nextcloud_dotlinker_mappings + [ { 'name': 'nextcloud-' ~ (item | lower), 'backend': 'cloud', 'src': nextcloud_user_home_directory ~ item, 'dest': nextcloud_cloud_directory ~ item } ] }} loop: "{{ nextcloud_dotlinker_folders }}" - name: ➕ Add dump mapping (Dump -> InstantUpload) ansible.builtin.set_fact: nextcloud_dotlinker_mappings: >- {{ nextcloud_dotlinker_mappings + [ { 'name': 'nextcloud-dump', 'backend': 'cloud', 'src': nextcloud_user_home_directory ~ 'Dump', 'dest': nextcloud_cloud_directory ~ 'InstantUpload' } ] }} - name: 📌 Apply Nextcloud folder mappings via dotlinker ansible.builtin.include_role: name: desk-dotlinker vars: dotlinker_user: "{{ lookup('users', WORKSTATION_USER).username }}" dotlinker_config_path: "{{ nextcloud_user_home_directory }}.config/dotlinker/config.yaml" dotlinker_replace: true dotlinker_apply: true dotlinker_mappings: "{{ nextcloud_dotlinker_mappings }}"