Files
computer-playbook/roles/desk-copyq/tasks/main.yml
Kevin Veen-Birkenbach 94f97ed1f3 Refactor: Migrate deprecated Ansible facts to ansible_facts[] syntax
Why:
- Ansible 2.20+ deprecates INJECT_FACTS_AS_VARS and direct usage of top-level ansible_* facts.
- This change updates all affected roles and vars files to the new supported syntax.
- Ensures compatibility with upcoming Ansible 2.24 removal of implicit fact injection.

Conversation reference:
https://chatgpt.com/share/692f639b-1380-800f-9f18-732f7108e9e2
2025-12-02 23:09:46 +01:00

31 lines
820 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
- name: Install CopyQ clipboard manager
community.general.pacman:
name: copyq
state: present
- name: Ensure autostart directory exists
file:
path: "{{ ansible_facts['env']['HOME'] }}/.config/autostart"
state: directory
mode: '0755'
become: false
- name: Add CopyQ to user autostart
copy:
dest: "{{ ansible_facts['env']['HOME'] }}/.config/autostart/copyq.desktop"
content: |
[Desktop Entry]
Type=Application
Exec=copyq
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=CopyQ Clipboard Manager
Comment=Advanced clipboard manager with searchable and editable history
mode: '0644'
become: false
- name: Include CopyQ server systemduser service setup
import_tasks: server.yml
when: copyq_server_enabled | bool