113 lines
3.6 KiB
YAML
113 lines
3.6 KiB
YAML
---
|
||
- 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:
|
||
# ++ http://www.draconianoverlord.com/2014/05/26/from-xmonad-to-i3.html
|
||
#
|
||
# https://github.com/sgentle/caniuse-cmd
|
||
#
|
||
# 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 |