--- - hosts: all pre_tasks: - name: update dotfiles repo git: repo: https://github.com/kejadlen/dotfiles.git dest: ~/.dotfiles ignore_errors: yes - hosts: all tasks: - name: install dependencies apt: name: "{{ item }}" update_cache: yes with_items: - make - mosh - libterm-readkey-perl - python-pip - software-properties-common - zsh become: yes - hosts: all roles: - dotfiles - zsh - hosts: all name: install Ansible tasks: - apt_repository: repo: ppa:ansible/ansible become: yes - apt: name: ansible update_cache: yes become: yes - hosts: all name: install Ruby tasks: - stat: path=/usr/local/bin/chruby-exec register: chruby - import_tasks: irregular-apocalypse/chruby.yml vars: version: 0.3.9 when: chruby.stat.exists == False - stat: path=/usr/bin/local/ruby-install register: ruby_install - import_tasks: irregular-apocalypse/ruby-install.yml vars: version: 0.6.1 when: ruby_install.stat.exists == False - stat: path=~/.rubies register: rubies - command: ruby-install ruby when: rubies.stat.exists == False