Files
dotfiles/dotfiles.yml
Pierre Martin f32ebf3a7f Moar TODO
2015-09-29 13:55:46 +02:00

116 lines
3.8 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
- name: Setup the machine as a root user
hosts: localhost
become: yes
become_user: root
roles:
- { role: flyinggecko.i3, tags: windowmanager,
i3_state: "present",
i3_user: [
{ name: pierre, i3config: [ i3.base ], i3status: i3status.desktop }
] }
- { role: franklinkim.vim, tags: vim,
vim_config: [ 'set expandtab' ] }
- { role: jdauphant.sublimetext, tags: sublimetext }
- { role: igor_mukhin.sublimetext3_packagecontrol, tags: sublimetext,
packagecontrol_packages: [
"AutoFileName",
"Git",
"GitGutter",
"SideBarEnhancements",
"Terminal" ] }
- { role: geerlingguy.git, tags: git,
git_packages: [
"git-gui",
"gitk",
"git-flow" ] }
- { role: kosssi.phpstorm, tags: phpstorm }
- { role: ansiblebit.oracle-java, tags: phpstorm,
oracle_java_set_as_default: yes }
- { role: franklinkim.docker, tags: docker,
docker_containers: [
{
image: jwilder/nginx-proxy,
name: nginx-proxy,
ports: ["80:80"],
volumes: [
"/var/run/docker.sock:/tmp/docker.sock:ro",
"/home/pierre/dotfiles/my_nginx_proxy.conf:/etc/nginx/conf.d/my_proxy.conf:ro"
]
}
]
}
- { role: franklinkim.docker-compose, tags: docker,
docker_compose_version: 1.4.1 }
- { role: glennr.oh-my-zsh, tags: shell,
user: pierre }
- { role: devbox.chrome, tags: browser }
- { role: nickjj.dnsmasq, tags: dnsmasq,
dnsmasq_tld: test }
tasks:
- name: Window manager related packages are installed
apt: name={{ item }} state=present
tags: windowmanager
with_items:
- suckless-tools
- pcmanfm
- dunst
- numlockx
- xbacklight
- name: Other convenient tools are installed
apt: name={{ item }} state=present
tags: tools
with_items:
- ack-grep
- curl
- filezilla
- gimp
- htop
- meld
- pandoc
- shutter
- exfat-utils
- exfat-fuse
- xclip
- name: Thinkpad related packages are installed
apt: name={{ item }} state=present
tags: thinkpad
with_items:
- alsa-tools-gui # See how to configure dock audio output at http://askubuntu.com/questions/670334/thinkpad-w540-docking-station-no-sound-on-external-speakers
- name: Setup user settings
hosts: localhost
become: no
vars:
BIN_DIR: "{{ansible_env.HOME}}/bin"
tasks:
- name: ensure Git is properly configured
tags: git
template: src=templates/{{ item.src }} dest={{ansible_env.HOME}}/{{ item.dest }}
with_items:
- { src: gitconfig.j2, dest: .gitconfig }
- { src: gitignore.j2, dest: .gitignore }
- name: ensure a writable "bin" directory exists
file: path={{BIN_DIR}} state=directory mode=0755
- name: ensure fasd is installed and configured
get_url: url=https://raw.githubusercontent.com/clvv/fasd/master/fasd dest={{BIN_DIR}}/fasd mode=0755
- name: ensure binaries are available in path
copy: src=bin/ dest={{BIN_DIR}}/ mode=0755
- name: ensure dotfiles are available
copy: src=.zshrc dest={{ansible_env.HOME}}/.zshrc
# TODO
# i3 bugfixes/improvements:
# ++ http://www.draconianoverlord.com/2014/05/26/from-xmonad-to-i3.html
#
# https://github.com/sgentle/caniuse-cmd
#
# Capistrano : docker run --rm -it -v `pwd`:/home -v $HOME/.ssh:/root/.ssh --workdir="/home" ruby:slim bash -c "bundle install && bundle exec cap deploy"
#
# sudo usermod -aG docker pierre ?
# Dropbox
# Vault for passwords and sensitive data: http://docs.ansible.com/ansible/playbooks_vault.html
#
# Refactoring:
# Nginx-proxy: move the config file by copying it where it belongs