# HG changeset patch # User Meredith Howard # Date 1458490899 14400 # Node ID 98981c22420ae6af43dda414d8085af258029d6e # Parent 4b7a16eeae42949a7713aae684350d44697a5274 Add vim and firefox roles diff --git a/roles/devbox/meta/main.yml b/roles/devbox/meta/main.yml --- 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} diff --git a/roles/devbox/tasks/dist-debian.yml b/roles/devbox/tasks/dist-debian.yml --- 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 diff --git a/roles/firefox/tasks/main.yml b/roles/firefox/tasks/main.yml 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 diff --git a/roles/vim/tasks/main.yml b/roles/vim/tasks/main.yml 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 diff --git a/roles/vim/vars/Debian.yml b/roles/vim/vars/Debian.yml new file mode 100644 --- /dev/null +++ b/roles/vim/vars/Debian.yml @@ -0,0 +1,4 @@ +--- +dist_package: + base: vim + gui: vim-gtk diff --git a/roles/vim/vars/FreeBSD.yml b/roles/vim/vars/FreeBSD.yml new file mode 100644 --- /dev/null +++ b/roles/vim/vars/FreeBSD.yml @@ -0,0 +1,4 @@ +--- +dist_package: + base: vim + gui: vim-gtk3 diff --git a/roles/vim/vars/MacOSX.yml b/roles/vim/vars/MacOSX.yml new file mode 100644 --- /dev/null +++ b/roles/vim/vars/MacOSX.yml @@ -0,0 +1,3 @@ +--- +dist_package: + base: MacVim