Add all files needed to bring up VM and run agaric.com locally

This commit is contained in:
benjamin melançon 2018-08-20 10:45:20 -04:00
parent 52c8b60bac
commit 4d2bc0ee24
742 changed files with 24037 additions and 0 deletions

View file

@ -0,0 +1,62 @@
---
- name: Install packages required to build ruby (RedHat).
yum: "name={{ item }} state=present"
with_items:
- '@development'
- zlib-devel
- openssl-static
when: ansible_os_family == 'RedHat'
- name: Update apt cache (Debian).
apt: update_cache=yes cache_valid_time=86400
when: ansible_os_family == 'Debian'
- name: Install packages required to build ruby (Debian).
apt: "name={{ item }} state=present"
with_items:
- build-essential
- zlib1g-dev
- libssl-dev
- libyaml-dev
- libreadline6-dev
- zlib1g-dev
- libncurses5-dev
- libffi-dev
- libgdbm3
- libgdbm-dev
when: ansible_os_family == 'Debian'
- name: Download ruby.
get_url:
url: "{{ ruby_download_url }}"
dest: "{{ workspace }}/ruby-{{ ruby_version }}.tar.gz"
- name: Extract ruby.
unarchive:
src: "{{ workspace }}/ruby-{{ ruby_version }}.tar.gz"
dest: "{{ workspace }}/"
copy: no
- name: Build ruby.
command: >
{{ item }}
chdir={{ workspace }}/ruby-{{ ruby_version }}
creates=/usr/local/bin/ruby
with_items:
- ./configure --enable-shared
- make
- make install
- name: Add ruby symlinks.
file:
src: "/usr/local/bin/{{ item }}"
dest: "/usr/bin/{{ item }}"
state: link
force: yes
with_items:
- erb
- gem
- irb
- rake
- rdoc
- ruby

View file

@ -0,0 +1,34 @@
---
# Include OS-specific installation tasks.
- include: setup-RedHat.yml
when:
- ruby_install_from_source == False
- ansible_os_family == 'RedHat'
- include: setup-Debian.yml
when:
- ruby_install_from_source == False
- ansible_os_family == 'Debian'
# Install ruby from source when ruby_install_from_source is true.
- include: install-from-source.yml
when: ruby_install_from_source == True
- name: Add user installed RubyGems bin directory to global $PATH.
copy:
src: rubygems.sh
dest: /etc/profile.d/rubygems.sh
mode: 0644
# Install Bundler and configured gems.
- name: Install Bundler.
gem: name=bundler state=present user_install=no
when: ruby_install_bundler
- name: Install configured gems.
gem:
name: "{{ item }}"
state: present
become: yes
become_user: "{{ ruby_install_gems_user }}"
with_items: "{{ ruby_install_gems }}"

View file

@ -0,0 +1,16 @@
---
- name: Update apt cache.
apt: update_cache=yes cache_valid_time=86400
- name: Set rubygems package name for Ubuntu 14.04.
set_fact:
ruby_rubygems_package_name: rubygems-integration
when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'trusty'
- name: Install ruby, rubygems, and build-essential.
apt: "name={{ item }} state=present"
with_items:
- ruby-full
- ruby-dev
- "{{ ruby_rubygems_package_name }}"
- build-essential

View file

@ -0,0 +1,8 @@
---
- name: Install ruby, rubygems, and development tools.
yum: "name={{ item }} state=present"
with_items:
- ruby
- ruby-devel
- "{{ ruby_rubygems_package_name }}"
- '@development'