Created
          October 23, 2013 20:21 
        
      - 
      
 - 
        
Save rob-b/7125996 to your computer and use it in GitHub Desktop.  
    Ansible playbooks for building silver searcher and the latest versions of vim + tmux from source and for installing my dotfiles
  
        
  
    
      This file contains hidden or 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: webservers | |
| connection: ssh | |
| user: $user | |
| sudo: yes | |
| tasks: | |
| - name: Install dotfile essentials | |
| apt: pkg=$item state=latest install_recommends=no update_cache=yes cache_valid_time=3600 | |
| with_items: | |
| - cmake | |
| - python-apt | |
| - exuberant-ctags | |
| - git-flow | |
| - htop | |
| - name: Set correct permisssions | |
| file: path=$home recurse=yes owner=$user group=$group state=directory | |
| - hosts: webservers | |
| connection: ssh | |
| user: $user | |
| tasks: | |
| - name: Clone dotfiles | |
| git: repo=https://[email protected]/rob_b/dotfiles.git dest=${home}/.dotfiles update=no | |
| - name: Install dotfiles | |
| command: make all chdir=${home}/.dotfiles creates=${home}/.config/python/pythonrc.py | 
  
    
      This file contains hidden or 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: webservers | |
| connection: ssh | |
| sudo: yes | |
| user: $user | |
| tasks: | |
| - file: path=${home}/packages state=directory owner=${user} group=${group} mode=755 | |
| tags: | |
| - ag | |
| - name: Install silver_searcher prerequisites | |
| apt: pkg=$item state=latest install_recommends=no | |
| with_items: | |
| - automake | |
| - pkg-config | |
| - libpcre3-dev | |
| - zlib1g-dev | |
| - liblzma-dev | |
| tags: | |
| - ag | |
| - name: Download silver_searcher | |
| get_url: url=https://github.com/ggreer/the_silver_searcher/archive/0.15.tar.gz dest=${home}/packages/the_silver_searcher-0.15.tar.gz | |
| tags: | |
| - ag | |
| - name: Extract silver searcher | |
| command: chdir=${home}/packages /bin/tar xvf the_silver_searcher-0.15.tar.gz creates=${home}/packages/the_silver_searcher-0.15 | |
| tags: | |
| - ag | |
| - name: Run build script for silver searcher | |
| command: chdir=${home}/packages/the_silver_searcher-0.15 ./build.sh creates=${home}/packages/the_silver_searcher-0.15/Makefile | |
| tags: | |
| - ag | |
| - hosts: webservers | |
| connection: ssh | |
| user: $user | |
| sudo: yes | |
| tasks: | |
| - name: Make silver searcher | |
| command: chdir=${home}/packages/the_silver_searcher-0.15 make install creates=/usr/local/bin/ag | |
| tags: | |
| - ag | |
| # only needed until newer vim appears in ubuntu repos | |
| - name: Add vim ppa | |
| apt_repository: repo=ppa:nmi/vim-snapshots | |
| - name: Install latest vim | |
| apt: pkg=$item state=latest install_recommends=no | |
| with_items: | |
| - vim-gnome | |
| # only needed until newer tmux appears in ubuntu repos | |
| - name: Download tmux 1.8-3 | |
| get_url: url=https://launchpad.net/ubuntu/+archive/primary/+files/tmux_1.8-3_amd64.deb dest=/var/cache/apt/archives/tmux_1.8-3_amd64.deb | |
| - name: Install tmux 1.8-3 | |
| command: dpkg -i tmux_1.8-3_amd64.deb chdir=/var/cache/apt/archives | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment