Files
dotfiles/dotfiles.yml
2016-07-22 08:15:41 +02:00

221 lines
6.0 KiB
YAML

---
- name: Setup the machine as a root user
hosts: localhost
become: yes
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: geerlingguy.git,
tags: git,
git_packages: [
"git-gui",
"gitk",
"git-flow",
"tig"
]
}
- {
role: kosssi.phpstorm,
tags: phpstorm,
phpstorm_version: "2016.2"
}
- {
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.7.0
}
- {
role: glennr.oh-my-zsh,
tags: shell,
user: pierre
}
- {
role: nickjj.dnsmasq,
tags: dnsmasq,
dnsmasq_tld: test
}
- {
role: jdauphant.sublimetext,
sublimetext_build: 3114,
tags: sublimetext
}
- {
role: mglaman.atom,
atom_ver : '1.8.0',
atom_packages_packages: [
'docker',
'editorconfig',
'git-time-machine',
'minimap',
],
tags: atom
}
tasks:
- name: Window manager related packages are installed
apt: name={{ item }} state=present
tags: windowmanager
with_items:
- suckless-tools
- pcmanfm
- dunst
- numlockx
- xbacklight
- name: Required PPAs are available
apt_repository: repo={{ item }} state=present
tags: tools
with_items:
- 'ppa:zeal-developers/ppa'
- 'ppa:nathan-renniewaldock/flux'
- name: Other convenient tools are installed
apt: name={{ item }} state=present
tags: tools
with_items:
- ack-grep
- byzanz
- curl
- filezilla
- fluxgui
- freemind
- kazam
- gimp
- htop
- libreoffice
- lftp
- meld
- mysql-workbench
- pandoc
- openssh-server
- shutter
- exfat-utils
- exfat-fuse
- ncdu
- python-pip
- tree
- unison
- whois
- xclip
- zeal
- name: Other convenient Python tools are installed
pip: name={{ item }}
tags: tools
with_items:
- http-prompt
- 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"
roles:
- {
role: igor_mukhin.sublimetext3_packagecontrol,
tags: sublimetext,
packagecontrol_packages: [
"AutoFileName",
"Dockerfile Syntax Highlighting",
"EditorConfig",
"Git",
"GitGutter",
"SideBarEnhancements",
"SCSS",
"Terminal"
]
}
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
tags: shell
file: path={{BIN_DIR}} state=directory mode=0755
- name: ensure fasd is installed and configured
tags: shell
get_url: url=https://raw.githubusercontent.com/clvv/fasd/master/fasd dest={{BIN_DIR}}/fasd mode=0755
- name: ensure binaries are available in path
tags: shell
copy: src=bin/ dest={{BIN_DIR}}/ mode=0755
- name: ensure dotfiles are available
tags: shell
copy: src=.zshrc dest={{ansible_env.HOME}}/.zshrc
# TODO
# i3 bugfixes/improvements:
# ++ http://www.draconianoverlord.com/2014/05/26/from-xmonad-to-i3.html
#
# echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
#
# Disable iBus (for IDEA at least: https://youtrack.jetbrains.com/issue/IDEA-78860)
# Config with "localectl --no-convert set-x11-keymap fr pc104"
# https://github.com/sgentle/caniuse-cmd
#
# Tigrc : https://github.com/chadrien/dotfiles/blob/master/roles/shell/files/tigrc#L10
#
# Capistrano : docker run --rm -it -v `pwd`:/home -v $HOME/.ssh:/root/.ssh --workdir="/home" ruby bash -c "bundle install && bundle exec cap deploy"
# Composer : docker run -v $(pwd):/app composer/composer install
# Auth.json -> home/qsdqs
# Mysql
#
# Corriger l'hibernation : http://doc.ubuntu-fr.org/veille_et_hibernation
#
# sudo usermod -aG docker pierre ?
# Dropbox
# Vault for passwords and sensitive data: http://docs.ansible.com/ansible/playbooks_vault.html
#
# Skype : https://hub.docker.com/r/sameersbn/skype/
# docker run -it --rm --volume /usr/local/bin:/target quay.io/sameersbn/skype:latest install
#
# Aliases++ https://github.com/thbkrkr/dotfiles/blob/master/dotfiles/.zshrc#L45
#
# Zeal pour doc offline
#
# http://askubuntu.com/questions/292696/ubuntu-crashes-when-on-battery-power
# ou http://askubuntu.com/questions/598224/cpu-frequency-control ou truc du genre
#
# Chrome :
# - { role: devbox.chrome, tags: browser }
#
# https://github.com/donnemartin/gitsome/blob/master/README.md
#
# Refactoring:
# Nginx-proxy: move the config file by copying it where it belongs