Initial whack at an Ansible config playbook

pull/28/head
Alpha Chen 11 years ago
parent 302d6ca54c
commit e6be574d34

2
.gitignore vendored

@ -0,0 +1,2 @@
*.hosts
*.private

@ -0,0 +1,3 @@
[defaults]
hostfile = my.hosts
# ask_sudo_pass = True

@ -0,0 +1,28 @@
- hosts: all
tasks:
- group_by: key={{ ansible_distribution }}
- hosts: MacOSX
gather_facts: false
tasks:
- name: install dependencies
homebrew: name={{ item }} state=present
with_items:
- git
- stow
- hosts: Debian
gather_facts: false
tasks:
- name: install dependencies
apt: pkg={{ item }} state=present
with_items:
- git
- stow
- hosts: all
gather_facts: false
tasks:
- name: clone dotfiles
git: repo=https://github.com/kejadlen/dotfiles.git dest=~/.dotfiles
- name: stow files
command: stow --target={{ ansible_env.HOME }} --stow {{ ansible_env.HOME }}/.dotfiles/{{ item }}
with_items:
- git

@ -0,0 +1,52 @@
[include]
path = ~/.gitconfig.private
[color]
ui = auto
diff = true
[core]
autocrlf = false
safecrlf = true
excludesfile = /Users/alpha/.gitignore
quotepath = false
[alias]
; hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
co = checkout
g = grep --break --heading --line-number
standup = "!git log --all --date=short --no-merges --pretty=format:\"%h %ad %s%d\" --since=1.weeks --author=`git config user.email`"
; ready = rebase -i @{u}
ready = rebase -i develop
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
; ancestor = merge-base
s = status -sb
latest = for-each-ref --count=20 --sort=-committerdate --format='%(committerdate:short) %(refname:short)'
root = !pwd
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[push]
default = current
[difftool "kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[mergetool "kaleidoscope"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
trustExitCode = true
[grep]
extendRegexp = true
lineNumber = true
[pull]
rebase = true
[apply]
whitespace = warn
[merge]
conflictstyle = diff3
ff = false
[init]
templatedir = /Users/alpha/.git_templates
[diff]
algorithm = patience
[fetch]
prune = true

27
git/.gitignore vendored

@ -0,0 +1,27 @@
# vim
doc/tags
# direnv
.envrc
# Ruby
.bundle
# OS X
.DS_Store
# Xcode
build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
*.xcworkspace
!default.xcworkspace
xcuserdata
profile
*.moved-aside
Loading…
Cancel
Save