blob: 0b013b344728e8be6120ecb60188b250aef2d4df (
plain) (
tree)
|
|
- name: Check out emacsconf-el
ansible.builtin.git:
repo: https://git.emacsconf.org/emacsconf-el
dest: "~{{ emacsconf_user }}/emacsconf-el"
register: elisp
failed_when:
- elisp.failed
- not 'Local modifications exist in repository' in elisp.msg
- not 'Failed to checkout branch' in elisp.msg
debugger: on_failed
- name: Install Emacs packages
become_user: "{{ emacsconf_user }}"
shell: |
emacs --batch --exec "(progn (require 'package)
(let ((packages (seq-remove #'package-installed-p '({% for package in packages %}{{ package }} {% endfor %}))))
(when packages
(package-refresh-contents)
(mapc #'package-install packages))))"
vars:
packages:
- modus-themes
- vertico
- orderless
- name: Set up Emacs configuration for interactive editing
template:
src: emacsconf-stream-config.el
dest: "{{ emacs_config_dir }}/emacsconf-stream-config.el"
owner: "{{ emacsconf_user }}"
group: "{{ emacsconf_group }}"
- name: Add to Emacs configuration
lineinfile:
dest: "{{ emacs_config_dir }}/init.el"
state: present
regexp: "emacsconf-stream-config"
line: "(load-file \"{{ emacs_config_dir }}/emacsconf-stream-config.el\")"
owner: "{{ emacsconf_user }}"
group: "{{ emacsconf_group }}"
create: yes
|