diff options
| author | Carlos Konstanski <ckonstanski@pippiandcarlos.com> | 2017-08-30 13:09:56 -0600 |
|---|---|---|
| committer | Carlos Konstanski <ckonstanski@pippiandcarlos.com> | 2017-08-30 13:09:56 -0600 |
| commit | 649f0dd9c5ca586d8b637400dd19c0c4059447d6 (patch) | |
| tree | 5ccc992a3aa5de1bcb510911dfdb21e6a54bd197 /salt/openbook/ansible/files/openjdk.yaml | |
initial commit
Diffstat (limited to 'salt/openbook/ansible/files/openjdk.yaml')
| -rw-r--r-- | salt/openbook/ansible/files/openjdk.yaml | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/salt/openbook/ansible/files/openjdk.yaml b/salt/openbook/ansible/files/openjdk.yaml new file mode 100644 index 0000000..a016866 --- /dev/null +++ b/salt/openbook/ansible/files/openjdk.yaml @@ -0,0 +1,44 @@ +--- +- name: "Install openjdk" + hosts: target + tasks: + - name: "Update apt" + apt: + update_cache: yes + when: ansible_distribution == "Ubuntu" + + - name: "Install openjdk package" + apt: + pkg: "{{ item }}" + state: present + with_items: + - openjdk-8-jre-headless + when: ansible_distribution == "Ubuntu" + + - name: "Update yum cache" + yum: + update_cache: yes + when: ansible_distribution == "RedHat" or ansible_distribution == "CentOS" + + - name: "Install openjdk package" + yum: + name: "{{ item }}" + state: present + with_items: + - openjdk + when: ansible_distribution == "RedHat" or ansible_distribution == "CentOS" + + - name: "Install icedtea package" + portage: + name: "{{ item }}" + state: present + with_items: + - dev-java/icedtea:8 + when: ansible_distribution == "Gentoo" +<<<<<<< HEAD +======= + + - name: "Set icedtea-8 as default java" + shell: java-config -S icedtea-8 + when: ansible_distribution == "Gentoo" +>>>>>>> 5d6764d17db282814ad18a15f08a74115dfa36f6 |
