Last active
August 29, 2015 14:25
-
-
Save nmandery/b8e39d40bfbe84a2c822 to your computer and use it in GitHub Desktop.
Ansible playbook to install the dotfiles from github.com/nmandery/dotfiles
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
# vi: set ft=yml | |
--- | |
- hosts: all | |
sudo: no | |
vars: | |
dotfiles_dir: "{{ansible_user_dir}}/.dotfiles" | |
handlers: | |
- name: purge cached system packages | |
shell: apt-get clean | |
sudo: yes | |
tasks: | |
- name: Update apt cache (just once) | |
apt: update_cache=yes | |
sudo: yes | |
- name: Install base packages | |
apt: name={{item}} state=present | |
with_items: | |
- git | |
- vim | |
- htop | |
- exuberant-ctags | |
- python | |
sudo: yes | |
notify: purge cached system packages | |
- name: Clone dotfiles from github | |
git: repo=http://github.com/nmandery/dotfiles dest={{dotfiles_dir}} update=yes | |
register: git_result | |
- name: Run dotfiles installer | |
shell: bash install.sh | |
args: | |
chdir: "{{dotfiles_dir}}" | |
when: git_result.changed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This has been moved to https://github.com/nmandery/ansible-playbooks