parent
7eb91b8600
commit
b892605076
@ -0,0 +1,48 @@
|
|||||||
|
---
|
||||||
|
- 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
|
||||||
|
- python-pip
|
||||||
|
- zsh
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
- hosts: all
|
||||||
|
roles:
|
||||||
|
- dotfiles
|
||||||
|
- zsh
|
||||||
|
|
||||||
|
- hosts: all
|
||||||
|
tasks:
|
||||||
|
- stat: path=/usr/bin/local/chruby-exec
|
||||||
|
register: chruby
|
||||||
|
- import_tasks: irregular-apocalypse/chruby.yml
|
||||||
|
vars:
|
||||||
|
version: 0.3.9
|
||||||
|
when: chruby.stat.exists == False
|
||||||
|
|
||||||
|
- hosts: all
|
||||||
|
tasks:
|
||||||
|
- 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 == True
|
||||||
|
|
||||||
|
- hosts: all
|
||||||
|
tasks:
|
||||||
|
- name: install Ruby
|
||||||
|
command: ruby-install ruby
|
@ -0,0 +1,21 @@
|
|||||||
|
- name: create ~/src
|
||||||
|
file:
|
||||||
|
path: ~/src
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: download chruby
|
||||||
|
get_url:
|
||||||
|
url: https://github.com/postmodern/chruby/archive/v{{ version }}.tar.gz
|
||||||
|
dest: ~/src/chruby-{{ version }}.tar.gz
|
||||||
|
|
||||||
|
- name: extract chruby
|
||||||
|
unarchive:
|
||||||
|
src: ~/src/chruby-{{ version }}.tar.gz
|
||||||
|
dest: ~/src
|
||||||
|
remote_src: yes
|
||||||
|
|
||||||
|
- name: install chruby
|
||||||
|
command: make install
|
||||||
|
args:
|
||||||
|
chdir: "{{ ansible_env.HOME }}/src/chruby-{{ version }}"
|
||||||
|
become: yes
|
@ -0,0 +1,16 @@
|
|||||||
|
- name: download ruby-install
|
||||||
|
get_url:
|
||||||
|
url: https://github.com/postmodern/ruby-install/archive/v{{ version }}.tar.gz
|
||||||
|
dest: ~/src/ruby-install-{{ version }}.tar.gz
|
||||||
|
|
||||||
|
- name: extract ruby-install
|
||||||
|
unarchive:
|
||||||
|
src: ~/src/ruby-install-{{ version }}.tar.gz
|
||||||
|
dest: ~/src
|
||||||
|
remote_src: yes
|
||||||
|
|
||||||
|
- name: install ruby-install
|
||||||
|
command: make install
|
||||||
|
args:
|
||||||
|
chdir: "{{ ansible_env.HOME }}/src/ruby-install-{{ version }}"
|
||||||
|
become: yes
|
Loading…
Reference in new issue