diff options
| author | Carlos Konstanski <ckonstanski@pippiandcarlos.com> | 2017-11-13 16:50:55 -0700 |
|---|---|---|
| committer | Carlos Konstanski <ckonstanski@pippiandcarlos.com> | 2017-11-13 16:50:55 -0700 |
| commit | ffa2a169ea98fb54a29d90ca158059e79e2816ba (patch) | |
| tree | 018461d031b71178fa48b9672d8e39bac4de1270 /playbooks/gradle.yaml | |
initial commit
Diffstat (limited to 'playbooks/gradle.yaml')
| -rw-r--r-- | playbooks/gradle.yaml | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/playbooks/gradle.yaml b/playbooks/gradle.yaml new file mode 100644 index 0000000..4e7dc6a --- /dev/null +++ b/playbooks/gradle.yaml @@ -0,0 +1,53 @@ +--- +- name: "Install gradle" + hosts: target + tasks: + - name: "Add gradle PPA" + apt_repository: + repo: ppa:cwchien/gradle + state: present + when: ansible_distribution == "Ubuntu" + + - name: "Add nodejs PPA" + shell: curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - + when: ansible_distribution == "Ubuntu" + + - name: "Update apt" + apt: + update_cache: yes + when: ansible_distribution == "Ubuntu" + + - name: "Install packages" + apt: + pkg: "{{ item }}" + state: present + with_items: + - gradle + - nodejs + 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 + - nodejs + 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" + + - name: "Forcibly upgrade npm" + shell: npm install npm@latest -g |
