summaryrefslogtreecommitdiff
path: root/salt/openbook/ansible/files/gradle.yaml
blob: 04bed5a98bfb733446df1d9f19efe9866cf47821 (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
34
35
36
37
38
39
40
41
42
43
---
- name: "Install gradle"
  hosts: target
  tasks:
    - name: "Add gradle PPA"
      apt_repository:
        repo: ppa:cwchien/gradle
        state: present

    - name: "Update apt"
      apt:
        update_cache: yes
      when: ansible_distribution == "Ubuntu"

    - name: "Install packages"
      apt:
        pkg: "{{ item }}"
        state: present
      with_items:
        - gradle
      when: ansible_distribution == "Ubuntu"

    - name: "Update yum cache"
      yum:
        update_cache: yes
      when: ansible_distribution == "RedHat" or ansible_distribution == "CentOS"

    - name: "Install packages"
      yum:
        name: "{{ item }}"
        state: present
      with_items:
        - gradle
      when: ansible_distribution == "RedHat" or ansible_distribution == "CentOS"

    - name: "Install packages"
      portage:
        name: "{{ item }}"
        state: present
      with_items:
        - dev-java/gradle-bin
        - net-libs/nodejs
      when: ansible_distribution == "Gentoo"