Add vim and firefox roles

Sun, 20 Mar 2016 12:21:39 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Sun, 20 Mar 2016 12:21:39 -0400
changeset 27
98981c22420a
parent 26
4b7a16eeae42
child 28
6f7483dfe742

Add vim and firefox roles

roles/devbox/meta/main.yml file | annotate | diff | comparison | revisions
roles/devbox/tasks/dist-debian.yml file | annotate | diff | comparison | revisions
roles/firefox/tasks/main.yml file | annotate | diff | comparison | revisions
roles/vim/tasks/main.yml file | annotate | diff | comparison | revisions
roles/vim/vars/Debian.yml file | annotate | diff | comparison | revisions
roles/vim/vars/FreeBSD.yml file | annotate | diff | comparison | revisions
roles/vim/vars/MacOSX.yml file | annotate | diff | comparison | revisions
--- a/roles/devbox/meta/main.yml
+++ b/roles/devbox/meta/main.yml
@@ -8,3 +8,5 @@ dependencies:
   - ag
   - ctags
   - tmux
+  - vim
+  - {role: firefox, when: gui.enabled}
--- a/roles/devbox/tasks/dist-debian.yml
+++ b/roles/devbox/tasks/dist-debian.yml
@@ -1,10 +1,9 @@
 ---
 
 - name: Install base packages
-  apt: name={{item}} state=installed default_release={{ansible_distribution_release}}-backports
+  apt: name={{item}} state=installed
   with_items:
     - build-essential
-    - vim
   tags: packages, install
 
 - name: Install GUI packages
@@ -12,8 +11,6 @@
   apt: name={{item}} state=installed default_release={{ansible_distribution_release}}-backports
   with_items:
     - i3
-    - vim-gtk
-    - iceweasel
     - fonts-dejavu-extra
     - fonts-opensymbol
     - scrot
new file mode 100644
--- /dev/null
+++ b/roles/firefox/tasks/main.yml
@@ -0,0 +1,10 @@
+---
+- apt_repository:
+    repo: "deb http://mozilla.debian.net/ {{ansible_distribution_release}}-backports firefox-release"
+  when: ansible_os_family == 'Debian'
+  tags: repos
+
+- package:
+    name: firefox
+    state: latest
+  tags: packages, install
new file mode 100644
--- /dev/null
+++ b/roles/vim/tasks/main.yml
@@ -0,0 +1,14 @@
+---
+- include_vars: "{{ansible_os_family}}.yml"
+
+- package:
+    name: "{{dist_package.base}}"
+    state: latest
+  tags: packages, install
+
+- name: gui package
+  package:
+    name: "{{dist_package.gui}}"
+    state: latest
+  when: dist_package.gui and gui.enabled
+  tags: packages, install
new file mode 100644
--- /dev/null
+++ b/roles/vim/vars/Debian.yml
@@ -0,0 +1,4 @@
+---
+dist_package:
+  base: vim
+  gui: vim-gtk
new file mode 100644
--- /dev/null
+++ b/roles/vim/vars/FreeBSD.yml
@@ -0,0 +1,4 @@
+---
+dist_package:
+  base: vim
+  gui: vim-gtk3
new file mode 100644
--- /dev/null
+++ b/roles/vim/vars/MacOSX.yml
@@ -0,0 +1,3 @@
+---
+dist_package:
+  base: MacVim

mercurial