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,63 @@
---
- name: Ensure git's dependencies are installed (RedHat).
package: "name={{ item }} state=installed"
with_items:
- gettext-devel
- expat-devel
- curl-devel
- zlib-devel
- perl-devel
- openssl-devel
- subversion-perl
- make
- gcc
when: ansible_os_family == 'RedHat'
- name: Ensure git's dependencies are installed (Debian).
apt: "name={{ item }} state=installed"
with_items:
- libcurl4-gnutls-dev
- libexpat1-dev
- gettext
- libssl-dev
- build-essential
- gcc
when: ansible_os_family == 'Debian'
- name: Get installed version
command: >
git --version
warn=no
changed_when: false
failed_when: false
check_mode: no
register: git_installed_version
- name: Force git install if the version numbers do not match
set_fact:
git_reinstall_from_source: true
when: 'git_install_from_source_force_update and (git_installed_version|success and (git_installed_version.stdout | regex_replace("^.*?([0-9\.]+)$", "\\1") | version_compare(git_version, operator="!=")))'
- name: Download git.
get_url:
url: "https://www.kernel.org/pub/software/scm/git/git-{{ git_version }}.tar.gz"
dest: "{{ workspace }}/git-{{ git_version }}.tar.gz"
when: git_installed_version|failed or git_reinstall_from_source
- name: Expand git archive.
unarchive:
src: "{{ workspace }}/git-{{ git_version }}.tar.gz"
dest: "{{ workspace }}"
creates: "{{ workspace }}/git-{{ git_version }}/README"
copy: no
when: git_installed_version|failed or git_reinstall_from_source
- name: Build git.
command: >
make prefix={{ git_install_path }} {{ item }}
chdir={{ workspace }}/git-{{ git_version }}
with_items:
- all
- install
when: git_installed_version|failed or git_reinstall_from_source
become: yes

View file

@ -0,0 +1,23 @@
---
- name: Ensure git is installed (RedHat).
package:
name: "{{ item }}"
state: installed
enablerepo: "{{ git_enablerepo }}"
with_items: "{{ git_packages }}"
when: (git_install_from_source == false) and (ansible_os_family == 'RedHat')
- name: Update apt cache (Debian).
apt: update_cache=yes cache_valid_time=86400
when: ansible_os_family == 'Debian'
- name: Ensure git is installed (Debian).
apt:
name: "{{ item }}"
state: installed
with_items: "{{ git_packages }}"
when: (git_install_from_source == false) and (ansible_os_family == 'Debian')
# Install git from source when git_install_from_source is true.
- include: install-from-source.yml
when: git_install_from_source == true