Starting an emacs role.
This commit is contained in:
25
ansible/roles/emacs/tasks/common.yaml
Normal file
25
ansible/roles/emacs/tasks/common.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
- name: Install scripts
|
||||
copy:
|
||||
src: "files/{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: wheel
|
||||
loop:
|
||||
- src: plainmacs
|
||||
dest: /usr/local/bin/plainmacs
|
||||
|
||||
- import_tasks: tasks/freebsd.yaml
|
||||
when: 'os_flavor == "freebsd"'
|
||||
|
||||
- import_tasks: tasks/linux.yaml
|
||||
when: 'os_flavor == "linux"'
|
||||
|
||||
- include_tasks:
|
||||
file: tasks/peruser.yaml
|
||||
apply:
|
||||
become: yes
|
||||
become_user: "{{ initialize_user }}"
|
||||
loop: "{{ users | dict2items | community.general.json_query('[?value.initialize==`true`].key') }}"
|
||||
loop_control:
|
||||
loop_var: initialize_user
|
||||
23
ansible/roles/emacs/tasks/freebsd.yaml
Normal file
23
ansible/roles/emacs/tasks/freebsd.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
- name: Install packages
|
||||
package:
|
||||
name:
|
||||
- emacs
|
||||
- texlive-full
|
||||
- py39-pygments
|
||||
- inkscape # to support SVGs in LaTeX
|
||||
# - prettier # typescript formatting
|
||||
- aspell
|
||||
- en-aspell
|
||||
- unzip # for extracting mspyls
|
||||
- py39-isort
|
||||
- py39-black
|
||||
- zip # for odt export from org-mode
|
||||
- gnuplot # used for exporting graphs from org-mode
|
||||
- graphviz # used for exporting graphviz dot charts from org-mode
|
||||
# - pyright
|
||||
- sqlite3 # for sqlite code blocks in org-mode
|
||||
# - terraform-ls # Terraform language server
|
||||
- py39-ptvsd
|
||||
- hs-ShellCheck
|
||||
# - gopls
|
||||
state: present
|
||||
6
ansible/roles/emacs/tasks/linux.yaml
Normal file
6
ansible/roles/emacs/tasks/linux.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
# - name: Install packages
|
||||
# pacman:
|
||||
# name:
|
||||
# - foo
|
||||
# state: present
|
||||
# update_cache: true
|
||||
1
ansible/roles/emacs/tasks/main.yaml
Normal file
1
ansible/roles/emacs/tasks/main.yaml
Normal file
@@ -0,0 +1 @@
|
||||
- import_tasks: tasks/common.yaml
|
||||
29
ansible/roles/emacs/tasks/peruser.yaml
Normal file
29
ansible/roles/emacs/tasks/peruser.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
- include_role:
|
||||
name: per_user
|
||||
|
||||
# - name: Create directories
|
||||
# file:
|
||||
# name: "{{ account_homedir.stdout }}/{{ item }}"
|
||||
# state: directory
|
||||
# mode: 0700
|
||||
# owner: "{{ account_name.stdout }}"
|
||||
# group: "{{ group_name.stdout }}"
|
||||
# loop:
|
||||
# - ".config/foo"
|
||||
|
||||
# - name: Copy files
|
||||
# copy:
|
||||
# src: "files/{{ item.src }}"
|
||||
# dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
|
||||
# mode: 0600
|
||||
# owner: "{{ account_name.stdout }}"
|
||||
# group: "{{ group_name.stdout }}"
|
||||
# loop:
|
||||
# - src: foo.conf
|
||||
# dest: .config/foo/foo.conf
|
||||
|
||||
- import_tasks: tasks/peruser_freebsd.yaml
|
||||
when: 'os_flavor == "freebsd"'
|
||||
|
||||
- import_tasks: tasks/peruser_linux.yaml
|
||||
when: 'os_flavor == "linux"'
|
||||
0
ansible/roles/emacs/tasks/peruser_freebsd.yaml
Normal file
0
ansible/roles/emacs/tasks/peruser_freebsd.yaml
Normal file
0
ansible/roles/emacs/tasks/peruser_linux.yaml
Normal file
0
ansible/roles/emacs/tasks/peruser_linux.yaml
Normal file
Reference in New Issue
Block a user