2019-10-03 10:50:19 +00:00
|
|
|
---
|
2019-10-03 14:24:33 +00:00
|
|
|
- name: Clone Emacs settings
|
2019-10-03 10:50:19 +00:00
|
|
|
git:
|
2020-01-10 15:39:47 +00:00
|
|
|
repo: https://code.acperkins.com/acp/emacs.d.git
|
2019-10-03 10:50:19 +00:00
|
|
|
dest: "{{ ansible_env.HOME }}/.emacs.d"
|
2019-10-03 14:24:33 +00:00
|
|
|
- name: Find Emacs service definition
|
2019-10-03 10:50:19 +00:00
|
|
|
find:
|
|
|
|
paths: /usr/share/emacs
|
|
|
|
patterns: 'emacs.service'
|
|
|
|
recurse: yes
|
|
|
|
depth: 3
|
|
|
|
register: emacs_service_files
|
2019-10-10 18:45:35 +00:00
|
|
|
when: ansible_system == 'Linux'
|
2019-10-14 09:40:50 +00:00
|
|
|
- name: Create Emacs user service (Linux)
|
2019-10-03 10:50:19 +00:00
|
|
|
copy:
|
|
|
|
src: '{{ item.path }}'
|
|
|
|
dest: "{{ ansible_env.HOME }}/.config/systemd/user/emacs.service"
|
|
|
|
remote_src: yes
|
|
|
|
loop: '{{ emacs_service_files.files }}'
|
2019-10-10 18:45:35 +00:00
|
|
|
when: ansible_system == 'Linux'
|
2019-10-14 09:40:50 +00:00
|
|
|
- name: Add Emacs server to autostart (FreeBSD)
|
|
|
|
copy:
|
|
|
|
src: '{{ ansible_env.HOME }}/.emacs.d/emacs-server.desktop'
|
|
|
|
dest: '{{ ansible_env.HOME }}/.config/autostart'
|
|
|
|
remote_src: yes
|
|
|
|
when: ansible_system == 'FreeBSD'
|
2019-10-03 14:24:33 +00:00
|
|
|
- name: Start Emacs user service
|
2019-10-03 10:50:19 +00:00
|
|
|
systemd:
|
|
|
|
name: emacs.service
|
|
|
|
scope: user
|
|
|
|
daemon_reload: yes
|
|
|
|
enabled: yes
|
|
|
|
state: started
|
2019-10-10 18:45:35 +00:00
|
|
|
when: ansible_system == 'Linux'
|
2019-10-03 14:24:33 +00:00
|
|
|
- name: Create Emacs client launcher
|
2019-10-03 10:50:19 +00:00
|
|
|
copy:
|
|
|
|
src: "{{ ansible_env.HOME }}/.emacs.d/emacs-client.desktop"
|
|
|
|
dest: "{{ ansible_env.HOME }}/.local/share/applications/emacs-client.desktop"
|
|
|
|
remote_src: yes
|