Created
October 10, 2014 20:49
-
-
Save yosmoc/57d7d8b3703058009a50 to your computer and use it in GitHub Desktop.
WIP: my ubuntu's playbook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[localhost] | |
127.0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: 127.0.0.1 | |
connection: local | |
sudo: yes | |
tasks: | |
- name: apt-get update | |
apt: update_cache=yes | |
- name: apt-get install | |
apt: name={{ item }} state=present | |
with_items: | |
- zsh | |
- git | |
- emacs | |
- vim | |
- golang | |
- gist | |
- tmux | |
- lv | |
- name: Installing oh-my-zsh (https://github.com/robbyrussell/oh-my-zsh) | |
git: repo=https://github.com/robbyrussell/oh-my-zsh dest=/home/vagrant/.oh-my-zsh | |
sudo: False | |
- name: Creating new ~/.zshrc | |
command: cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc | |
sudo: False | |
- name: be sure shell is zsh | |
command: grep vagrant /etc/passwd | |
register: resultsh | |
sudo: False | |
- name: change shell to zsh | |
command: chsh -s /usr/bin/zsh vagrant | |
when: resultsh.stdout.find('/usr/bin/zsh') == -1 | |
sudo: False | |
- name: Get latest peco version | |
shell: > | |
curl -sI https://github.com/peco/peco/releases/latest | awk -F'/' '/^Location:/{print $NF}' | |
register: peco_latest_version | |
- name: Download latest peco | |
get_url: url=https://github.com/peco/peco/releases/download/{{ peco_latest_version.stdout }}/peco_linux_amd64.tar.gz dest=/tmp/peco_linux_amd64.tar.gz | |
- name: Extract peco | |
unarchive: src=/tmp/peco_linux_amd64.tar.gz dest=/tmp/ | |
- name: Copy to /usr/bin/ | |
copy: src=/tmp/peco_linux_amd64/peco dest=/usr/bin/ mode=0755 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment