From 0f1d5cab1cdf056ff3df46cdacbb9b9a65607131 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Tue, 26 May 2020 21:46:25 -0400 Subject: [PATCH] Initial commit: core, dotfiles, pass, toolbox, emacs, xorg --- arch/roles/base/tasks/main.yml | 21 +++++++++++++++++++++ arch/roles/dotfiles/tasks/main.yml | 17 +++++++++++++++++ arch/roles/emacs/meta/main.yml | 2 ++ arch/roles/emacs/tasks/main.yml | 11 +++++++++++ arch/roles/gui/tasks/main.yml | 7 +++++++ arch/roles/password_store/tasks/main.yml | 12 ++++++++++++ arch/roles/toolbox/tasks/main.yml | 12 ++++++++++++ arch/workstation.yml | 15 +++++++++++++++ 8 files changed, 97 insertions(+) create mode 100644 arch/roles/base/tasks/main.yml create mode 100644 arch/roles/dotfiles/tasks/main.yml create mode 100644 arch/roles/emacs/meta/main.yml create mode 100644 arch/roles/emacs/tasks/main.yml create mode 100644 arch/roles/gui/tasks/main.yml create mode 100644 arch/roles/password_store/tasks/main.yml create mode 100644 arch/roles/toolbox/tasks/main.yml create mode 100644 arch/workstation.yml diff --git a/arch/roles/base/tasks/main.yml b/arch/roles/base/tasks/main.yml new file mode 100644 index 0000000..f6e299f --- /dev/null +++ b/arch/roles/base/tasks/main.yml @@ -0,0 +1,21 @@ +- name: Install core packages + become: yes + pacman: + name: + - man-db + - man-pages + - texinfo + - sudo + - git + - emacs + - ansible + - networkmanager + - openssh + state: present + +- name: Enable network manager + become: yes + systemd: + name: NetworkManager.service + enabled: yes + state: started diff --git a/arch/roles/dotfiles/tasks/main.yml b/arch/roles/dotfiles/tasks/main.yml new file mode 100644 index 0000000..52cb3b2 --- /dev/null +++ b/arch/roles/dotfiles/tasks/main.yml @@ -0,0 +1,17 @@ +- name: Clone dotfiles + git: + repo: "git@git.jeremydormitzer.com:jdormit/dotfiles.git" + dest: ~/dotfiles + accept_hostkey: true + update: no + +- name: Install GNU Stow + become: yes + pacman: + name: stow + state: present + +- name: Stow bash dotfiles + command: + chdir: "{{ ansible_env.HOME }}/dotfiles" + cmd: "stow bash" diff --git a/arch/roles/emacs/meta/main.yml b/arch/roles/emacs/meta/main.yml new file mode 100644 index 0000000..9a102f9 --- /dev/null +++ b/arch/roles/emacs/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - role: dotfiles \ No newline at end of file diff --git a/arch/roles/emacs/tasks/main.yml b/arch/roles/emacs/tasks/main.yml new file mode 100644 index 0000000..6dea02d --- /dev/null +++ b/arch/roles/emacs/tasks/main.yml @@ -0,0 +1,11 @@ +- name: Install Emacs + become: yes + pacman: + name: emacs + state: present + +- name: Configure Emacs + command: + chdir: "{{ ansible_env.HOME }}/dotfiles" + cmd: stow emacs + creates: "{{ ansible_env.HOME }}/init.org" diff --git a/arch/roles/gui/tasks/main.yml b/arch/roles/gui/tasks/main.yml new file mode 100644 index 0000000..bf374aa --- /dev/null +++ b/arch/roles/gui/tasks/main.yml @@ -0,0 +1,7 @@ +- name: Install xorg + become: yes + pacman: + name: + - xorg + - xorg-xinit + state: present diff --git a/arch/roles/password_store/tasks/main.yml b/arch/roles/password_store/tasks/main.yml new file mode 100644 index 0000000..84370b8 --- /dev/null +++ b/arch/roles/password_store/tasks/main.yml @@ -0,0 +1,12 @@ +- name: Install password store + become: yes + pacman: + name: pass + state: present + +- name: Clone password repository + git: + repo: "git@git.jeremydormitzer.com:jdormit/password-store.git" + dest: "~/.password-store" + accept_hostkey: true + update: no diff --git a/arch/roles/toolbox/tasks/main.yml b/arch/roles/toolbox/tasks/main.yml new file mode 100644 index 0000000..0d4d4c3 --- /dev/null +++ b/arch/roles/toolbox/tasks/main.yml @@ -0,0 +1,12 @@ +- name: Install development tools + become: yes + pacman: + name: + - gcc + - make + - cmake + - which + - git + - w3m + - gnupg + state: present diff --git a/arch/workstation.yml b/arch/workstation.yml new file mode 100644 index 0000000..e6355d7 --- /dev/null +++ b/arch/workstation.yml @@ -0,0 +1,15 @@ +- hosts: localhost + connection: local + tasks: + - import_role: + name: base + - import_role: + name: dotfiles + - import_role: + name: toolbox + - import_role: + name: password_store + - import_role: + name: emacs + - import_role: + name: gui