machine_setup/ansible/roles/emacs/tasks/peruser.yaml

67 lines
1.7 KiB
YAML
Raw Normal View History

2022-10-20 02:52:45 +00:00
- include_role:
name: per_user
2022-10-20 04:03:56 +00:00
- name: Create directories
file:
name: "{{ account_homedir.stdout }}/{{ item }}"
state: directory
mode: 0700
owner: "{{ account_name.stdout }}"
group: "{{ group_name.stdout }}"
loop:
2023-10-12 19:30:26 +00:00
- ".config/emacs/elisp"
2022-10-20 02:52:45 +00:00
2022-10-20 04:03:56 +00:00
- name: Configure dotfiles
2023-07-11 04:54:51 +00:00
when: 'emacs_flavor == "full"'
2022-10-20 04:03:56 +00:00
copy:
src: "files/{{ item.src }}"
dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
mode: 0600
owner: "{{ account_name.stdout }}"
group: "{{ group_name.stdout }}"
loop:
- src: init.el
2023-10-12 19:30:26 +00:00
dest: .config/emacs/init.el
- src: early-init.el
2023-10-12 19:30:26 +00:00
dest: .config/emacs/early-init.el
2022-10-20 04:03:56 +00:00
2023-07-11 04:54:51 +00:00
- name: Configure dotfiles
when: 'emacs_flavor == "plain"'
copy:
src: "files/{{ item.src }}"
dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
mode: 0600
owner: "{{ account_name.stdout }}"
group: "{{ group_name.stdout }}"
loop:
- src: plainmacs_init.el
2023-10-12 19:30:26 +00:00
dest: .config/emacs/init.el
2023-07-11 04:54:51 +00:00
2022-10-20 04:03:56 +00:00
- name: Configure elisp files
2023-07-11 04:54:51 +00:00
when: 'emacs_flavor == "full"'
2022-10-20 04:03:56 +00:00
copy:
src: "files/{{ item.src }}"
dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
2022-10-20 04:03:56 +00:00
owner: "{{ account_name.stdout }}"
group: "{{ group_name.stdout }}"
loop:
- src: elisp
2023-10-12 19:30:26 +00:00
dest: .config/emacs/
2022-10-20 02:52:45 +00:00
2022-10-24 00:36:45 +00:00
- name: Configure zshrc additional imports
copy:
src: "files/zshrc_{{ item }}"
dest: "{{ account_homedir.stdout }}/.config/ansible_deploy/zshrc/{{ item }}.zsh"
mode: 0600
owner: "{{ account_name.stdout }}"
group: "{{ group_name.stdout }}"
loop:
2023-07-11 04:54:51 +00:00
- emacs_e # Create an alias 'e' which launches emacs
- plainmacs # Set the EDITOR to plainmacs
2022-10-24 00:36:45 +00:00
2022-10-20 02:52:45 +00:00
- import_tasks: tasks/peruser_freebsd.yaml
when: 'os_flavor == "freebsd"'
- import_tasks: tasks/peruser_linux.yaml
when: 'os_flavor == "linux"'