summaryrefslogtreecommitdiffstats
blob: aa4b8f5e302f585bd767b8031e504851e53e9840 (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
32
33
- 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 for openSUSE Leap'
    shell: ./BuildTools/InstallSwiftDependencies.sh --non-interactive chdir=/home/vagrant/swift
    become: true
    when: ansible_distribution == 'openSUSE Leap'
  - name: 'Install Swift dependencies'
    environment:
      ACCEPT_LICENSE: '*'
    shell: yes | ./BuildTools/InstallSwiftDependencies.sh chdir=/home/vagrant/swift
    become: true
    when: ansible_distribution != 'openSUSE Leap'