Initial commit with a first start on my Ansible dotfiles

This commit is contained in:
Pierre Martin
2015-09-20 23:33:57 +02:00
parent 24ed775def
commit 5ed75b6d46
6 changed files with 85 additions and 0 deletions

47
dotfiles.yml Normal file
View File

@@ -0,0 +1,47 @@
---
- name: Setup the machine as a root user
hosts: localhost
become: yes
become_user: root
roles:
- { 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",
"Terminal" ] }
- { role: geerlingguy.git, tags: git,
git_packages: [
"git-gui",
"gitk" ] }
- { role: kosssi.phpstorm, tags: phpstorm }
- { role: ansiblebit.oracle-java, tags: phpstorm,
oracle_java_set_as_default: yes }
- { role: franklinkim.docker, tags: docker }
- { role: franklinkim.docker-compose, tags: docker,
docker_compose_version: 1.4.1 }
- { role: glennr.oh-my-zsh, tags: shell,
user: pierre }
- name: Setup user settings
hosts: localhost
become: no
tasks:
- name: ensure Git is properly configured
template: src=templates/gitconfig.j2 dest={{ansible_env.HOME}}/.gitconfig
# TODO
# Docker: extend to have nginx proxy:
# see https://github.com/weareinteractive/ansible-docker/blob/master/defaults/main.yml
# https://github.com/clvv/fasd
# Vault for passwords and sensitive data: http://docs.ansible.com/ansible/playbooks_vault.html
#
# Galaxy
# apt-repository: https://galaxy.ansible.com/list#/roles/3632
# php: https://galaxy.ansible.com/list#/roles/1232
#
# BIOS :
# switch ctrl / fn

2
hosts Normal file
View File

@@ -0,0 +1,2 @@
[local]
127.0.0.1

6
install.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install -y software-properties-common ansible

9
requirements.txt Normal file
View File

@@ -0,0 +1,9 @@
franklinkim.vim
jdauphant.sublimetext
igor_mukhin.sublimetext3_packagecontrol
geerlingguy.git
ansiblebit.oracle-java
kosssi.phpstorm
franklinkim.docker
franklinkim.docker-compose
glennr.oh-my-zsh

17
templates/gitconfig.j2 Normal file
View File

@@ -0,0 +1,17 @@
# {{ansible_managed}}
[user]
email=pierre@occitech.fr
name=Pierre Martin
[alias]
co = checkout
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = true
[core]
excludesfile = ~/.gitignore
editor = vim
filemode = false

4
update.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
ansible-playbook --ask-become-pass dotfiles.yml -i hosts \
|| sudo ansible-galaxy install -r requirements.txt --ignore-errors