# HG changeset patch # User Meredith Howard # Date 1458371471 14400 # Node ID ee86092e374a94d2df0e1251f236d8e61299b471 # Parent 40d4e3ca3b42fae4ed2bb011a7ab7c3fd82a1a7c use dist-named includes. fix apt-repository for rpi diff --git a/roles/devbox/tasks/debian.yml b/roles/devbox/tasks/dist-debian.yml rename from roles/devbox/tasks/debian.yml rename to roles/devbox/tasks/dist-debian.yml --- a/roles/devbox/tasks/debian.yml +++ b/roles/devbox/tasks/dist-debian.yml @@ -1,5 +1,8 @@ --- +- name: add python-apt + apt: name=python-apt state=installed + # Not used here, but nice to have ready - name: add backports repo apt_repository: @@ -7,6 +10,7 @@ tags: repos - name: add pgdg repo + when: ansible_architecture == 'amd64' apt_repository: repo: "deb http://apt.postgresql.org/pub/repos/apt/ {{ansible_distribution_release}}-pgdg main" tags: repos @@ -16,7 +20,7 @@ tags: packages, upgrade - name: Install base packages - apt: name={{item}} state=installed + apt: name={{item}} state=installed default_release={{ansible_distribution_release}}-backports with_items: - sudo - build-essential @@ -31,7 +35,7 @@ - name: Install GUI packages when: gui.enabled - apt: name={{item}} state=installed + apt: name={{item}} state=installed default_release={{ansible_distribution_release}}-backports with_items: - i3 - vim-gtk diff --git a/roles/devbox/tasks/main.yml b/roles/devbox/tasks/main.yml --- a/roles/devbox/tasks/main.yml +++ b/roles/devbox/tasks/main.yml @@ -1,7 +1,13 @@ --- -- include: debian.yml - when: ansible_distribution == 'Debian' +- include: dist-debian.yml + when: ansible_os_family == 'Debian' + +- include: dist-macosx.yml + when: ansible_os_family == 'MacOSX' + +- include: dist-freebsd.yml + when: ansible_os_family == 'FreeBSD' # sudo may not be everywhere. wheel is a common alternative