summaryrefslogtreecommitdiffstats
blob: bad4d3095a8a72724213aed03b5194b28334d999 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- hosts: all
  tasks:
  - name: Install required packages via apt
    apt: name=git state=latest update_cache=yes
    become: true
    when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
  - name: Install required packages via dnf
    dnf: name={{item}} state=latest
    with_items:
      - git
      - redhat-lsb
    become: true
    when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' or ansible_distribution == 'RedHat' or ansible_distribution == 'Fedora'
  - name: 'Install required packages via zypper'
    zypper: name={{item}} state=latest
    with_items:
      - git-core
      - lsb-release
    become: true
    when: ansible_distribution == 'openSUSE Leap'
  - name: Clone git from host working directory
    git: repo=/home/vagrant/swift-host dest=/home/vagrant/swift

  - name: 'Install Swift dependencies'
    shell: ./BuildTools/InstallSwiftDependencies.sh --non-interactive chdir=/home/vagrant/swift
    become: true
    when: ansible_distribution == 'openSUSE Leap'
  - name: 'Install Swift dependencies'
    shell: yes | ./BuildTools/InstallSwiftDependencies.sh chdir=/home/vagrant/swift
    become: true
    when: ansible_distribution != 'openSUSE Leap'