69 lines
1.5 KiB
YAML
69 lines
1.5 KiB
YAML
---
|
|
- name: Laptop local config
|
|
hosts: all
|
|
|
|
tasks:
|
|
- name: System packages
|
|
ansible.builtin.apt:
|
|
name:
|
|
- emacs
|
|
- elpa-flycheck
|
|
- elpa-solarized-theme
|
|
- flycheck-doc
|
|
- git
|
|
- ssh
|
|
- tmux
|
|
- xclip
|
|
state: latest
|
|
become: yes
|
|
|
|
- name: Emacs config file
|
|
ansible.builtin.copy:
|
|
src: files/init.el
|
|
dest: "{{ homedir }}/.emacs.d/init.el"
|
|
backup: yes
|
|
|
|
- name: Git config files
|
|
ansible.builtin.copy:
|
|
src: "{{ item }}"
|
|
dest: "{{ homedir }}"
|
|
backup: yes
|
|
with_items:
|
|
- files/.gitignore_global
|
|
- files/.gitconfig
|
|
|
|
- name: SSH config file
|
|
ansible.builtin.copy:
|
|
src: files/ssh_config
|
|
dest: "{{ homedir }}/.ssh/config"
|
|
backup: yes
|
|
|
|
- name: Install Tmux plugin manager
|
|
ansible.builtin.git:
|
|
repo: https://github.com/tmux-plugins/tpm.git
|
|
dest: "{{ homedir }}/.tmux/plugins/tpm"
|
|
|
|
- name: Tmux config file
|
|
ansible.builtin.copy:
|
|
src: files/.tmux.conf
|
|
dest: "{{ homedir }}/.tmux.conf"
|
|
backup: yes
|
|
|
|
- name: .bashrc ll command
|
|
ansible.builtin.lineinfile:
|
|
dest: "{{ homedir }}/.bashrc"
|
|
line: alias ll='ls -la'
|
|
|
|
- name: .bashrc git uses emacs
|
|
ansible.builtin.lineinfile:
|
|
dest: "{{ homedir }}/.bashrc"
|
|
line: "export EDITOR='emacs --maximized'"
|
|
|
|
- name: .bashrc workon function
|
|
ansible.builtin.blockinfile:
|
|
path: "{{ homedir }}/.bashrc"
|
|
block: |
|
|
workon() {
|
|
. ~/envs/$1/bin/activate
|
|
}
|