235 lines
6.5 KiB
YAML
235 lines
6.5 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: "2017.1.1"
|
|
}
|
|
- {
|
|
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", "443:443"],
|
|
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: 3126,
|
|
tags: sublimetext
|
|
}
|
|
- {
|
|
role: mglaman.atom,
|
|
atom_ver : '1.8.0',
|
|
atom_packages_packages: [
|
|
'docker',
|
|
'editorconfig',
|
|
'git-time-machine',
|
|
'minimap',
|
|
],
|
|
tags: atom
|
|
}
|
|
tasks:
|
|
- name: Ensure package definition is up-to-date, aka "apt-get update"
|
|
apt: update_cache=yes cache_valid_time=3600
|
|
- 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:
|
|
- asciidoctor
|
|
- silversearcher-ag
|
|
- byzanz
|
|
- curl
|
|
- filezilla
|
|
- fluxgui
|
|
- freemind
|
|
- kazam
|
|
- gimp
|
|
- htop
|
|
- libreoffice
|
|
- lftp
|
|
- meld
|
|
- mysql-workbench
|
|
- pandoc
|
|
- pv
|
|
- pwgen
|
|
- openssh-server
|
|
- owncloud-client
|
|
- shutter
|
|
- exfat-utils
|
|
- exfat-fuse
|
|
- ncdu
|
|
- p7zip
|
|
- python-pip
|
|
- tree
|
|
- unison
|
|
- whois
|
|
- xclip
|
|
- zeal
|
|
- name: Other convenient Python tools are installed
|
|
pip: name={{ item }}
|
|
tags: tools
|
|
with_items:
|
|
- http-prompt
|
|
- httpie-oauth
|
|
- 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
|
|
# Docker DNS qui trace : dans dnsmasq.conf
|
|
# listen-address=127.0.0.1
|
|
# listen-address=172.17.0.1
|
|
#
|
|
# https://github.com/sindresorhus/pure#getting-started instead of oh-my-zsh
|
|
#
|
|
# 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
|