Created
April 21, 2016 12:29
-
-
Save lepinkainen/50d9185d4fbc597d475b1c4cb78ee088 to your computer and use it in GitHub Desktop.
Ansible playbook for dev desktop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Check timezone | |
command: cat /etc/timezone | |
changed_when: no | |
register: current_timezone | |
- name: Change timezone | |
become: yes | |
copy: content='{{ timezone }}' | |
dest=/etc/timezone | |
owner=root | |
group=root | |
mode=0644 | |
backup=yes | |
register: set_timezone | |
when: "current_timezone.stdout != '{{ timezone }}'" | |
- name: update timezone | |
command: dpkg-reconfigure --frontend noninteractive tzdata | |
when: set_timezone.changed | |
- name: tmux ppa repository | |
become: yes | |
apt_repository: repo='ppa:pi-rho/dev' | |
ignore_errors: yes # this fails on raspi, but it's OK | |
- name: Make sure basic tools are installed and up to date | |
apt: pkg={{ item }} state=latest | |
become: yes | |
with_items: | |
- p7zip-full | |
- bsd-mailx | |
- curl | |
- htop | |
- nmap | |
- mosh | |
- tmux | |
- openntpd | |
- sqlite3 | |
- dnsutils | |
- ack-grep | |
- tree | |
- supervisor | |
- apt-transport-https | |
- name: Install emacs | |
apt: pkg={{ item }} state=latest | |
become: yes | |
with_items: | |
- emacs24 | |
- emacs-goodies-el | |
ignore_errors: yes # not having emacs is better than having old emacs | |
- include: security.yml | |
- name: openntpd service | |
become: yes | |
service: name=openntpd state=started | |
tags: service | |
- name: supervisor service | |
become: yes | |
service: name=supervisor state=started | |
tags: service | |
- name: ack divert | |
become: yes | |
command: /usr/bin/dpkg-divert --local --divert /usr/bin/ack --rename --add /usr/bin/ack-grep creates=/usr/bin/ack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Add repository | |
become: yes | |
apt_repository: repo="deb http://debian.sur5r.net/i3/ wily universe" | |
- name: Desktop environment installation | |
become: yes | |
apt: pkg={{ item }} state=latest | |
with_items: | |
# - sur5r-keyring # needs --allow-unauthenticated | |
- i3 | |
- i3lock | |
- i3status | |
- i3blocks | |
- rofi | |
- fonts-font-awesome | |
- name: i3 config dir | |
file: path=.i3/ state=directory | |
- name: i3 script dir | |
file: path=.i3/scripts/ state=directory | |
- name: Desktop configuration | |
copy: src=i3-config dest=.i3/config backup=yes | |
tags: copy | |
- name: i3blocks scripts | |
copy: src={{ item }} dest=.i3/scripts/{{ item }} backup=yes | |
with_items: | |
- apt-upgrades | |
- batterybar | |
- shutdown_menu | |
- name: GUI-related programs | |
become: yes | |
apt: pkg={{ item }} state=latest | |
with_items: | |
- vlc | |
- vlc-plugin-vlsub | |
- chromium-browser | |
# - steam # doesn't work because of shitty eula stuff, need to use debconf to preseed answers | |
- name: Add apt keys | |
become: yes | |
apt_key: keyserver=keyserver.ubuntu.com id={{ item }} | |
with_items: | |
- BBEBDCB318AD50EC6865090613B00F1FD2C19886 | |
- name: Add repository | |
become: yes | |
apt_repository: repo='deb http://repository.spotify.com stable non-free' | |
- name: Install spotify | |
become: yes | |
apt: name=spotify-client update_cache=yes state=latest | |
- name: Add apt keys | |
become: yes | |
apt_key: keyserver=pgp.mit.edu id={{ item }} | |
with_items: | |
- 1C61A2656FB57B7E4DE0F4C1FC918B335044912E | |
- name: Add repository | |
become: yes | |
apt_repository: repo='deb http://linux.dropbox.com/ubuntu wily main' | |
- name: Install dropbox | |
become: yes | |
apt: name={{ item }} update_cache=yes state=latest | |
with_items: | |
- dropbox | |
- python-gpgme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: General dev tools installation | |
become: yes | |
apt: pkg={{ item }} state=latest | |
with_items: | |
- git | |
- mercurial | |
- subversion | |
- ack-grep | |
- build-essential | |
- name: python dev tools installation | |
become: yes | |
apt: pkg={{ item }} state=latest | |
with_items: | |
- python | |
- python-virtualenv | |
- python-pip | |
- pyflakes | |
tags: python | |
- name: latest pip version | |
become: yes | |
pip: name=pip state=latest | |
tags: python | |
- name: python packages from pip | |
become: yes | |
pip: name={{ item }} state=latest | |
with_items: | |
pep8 | |
pylint | |
pyflakes | |
flake8 | |
virtualenv | |
tags: python | |
- name: Add the Nodesource apt key | |
become: yes | |
apt_key: url=https://deb.nodesource.com/gpgkey/nodesource.gpg.key state=present | |
tags: node | |
- name: Add nodesource repository for {{ ansible_distribution_release }} | |
become: yes | |
apt_repository: repo='deb https://deb.nodesource.com/node_5.x {{ ansible_distribution_release }} main' state=present | |
tags: node | |
- name: node dev tools installation | |
become: yes | |
apt: name={{ item }} state=latest update_cache=yes | |
with_items: | |
- nodejs | |
tags: node | |
- name: update npm | |
become: yes | |
npm: name=npm global=yes state=latest | |
tags: node |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment