mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Optimized desk-copyq draft and implemented server to use in gnome
This commit is contained in:
36
roles/desk-copyq/tasks/server.yml
Normal file
36
roles/desk-copyq/tasks/server.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
- name: Ensure systemd user unit directory exists
|
||||
file:
|
||||
path: "{{ ansible_env.HOME }}/.config/systemd/user"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: false
|
||||
|
||||
- name: Install CopyQ user service unit
|
||||
copy:
|
||||
dest: "{{ ansible_env.HOME }}/.config/systemd/user/copyq.service"
|
||||
content: |
|
||||
[Unit]
|
||||
Description=CopyQ Clipboard Manager Server
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/copyq --start-server
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
mode: '0644'
|
||||
become: false
|
||||
|
||||
- name: Reload systemd user daemon
|
||||
systemd:
|
||||
user: true
|
||||
daemon_reload: yes
|
||||
become: false
|
||||
|
||||
- name: Enable and start CopyQ user service
|
||||
systemd:
|
||||
name: copyq.service
|
||||
user: true
|
||||
enabled: yes
|
||||
state: started
|
||||
become: false
|
Reference in New Issue
Block a user