forked from ISTI-ansible-roles/ansible-roles
Role that manages the scala-sbt packages. See https://support.d4science.org/issues/12873
This commit is contained in:
parent
312f327e0f
commit
3463c7459a
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
scala_sbt_install: True
|
||||
scala_sbt_repo_key: "2EE0EA64E40A89B84B2DF73499E82A75642AC823"
|
||||
scala_sbt_repo: "deb https://dl.bintray.com/sbt/debian /"
|
||||
scala_sbt_pkgs:
|
||||
- sbt
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
dependencies:
|
||||
- { role: '../../library/roles/oracle-jdk', when: openjdk_install is not defined or not openjdk_install }
|
||||
- { role: '../../library/roles/openjdk', when: openjdk_install | default(False) }
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
- block:
|
||||
- name: Install the scala sbt repository key
|
||||
apt_key: keyserver='keyserver.ubuntu.com' id={{ scala_sbt_repo_key }} state=present
|
||||
|
||||
- name: Install the scala sbt repository configuration
|
||||
apt_repository: repo={{ scala_sbt_repo }} state=present update_cache=yes file=scala-sbt.list
|
||||
|
||||
- name: Install the scala sbt packages
|
||||
apt: pkg={{ scala_sbt_pkgs }} state=present update_cache=yes cache_valid_time=3600
|
||||
|
||||
when: scala_sbt_install
|
||||
tags: [ 'scala', 'sbt', 'scala_sbt' ]
|
||||
|
||||
- block:
|
||||
- name: Remove the scala sbt packages
|
||||
apt: pkg={{ scala_sbt_pkgs }} state=absent
|
||||
|
||||
- name: Remove the scala sbt repository configuration
|
||||
apt_repository: repo={{ scala_sbt_repo }} state=absent update_cache=yes file=scala-sbt.list
|
||||
|
||||
- name: Remove the scala sbt repository key
|
||||
apt_key: keyserver='keyserver.ubuntu.com' id={{ scala_sbt_repo_key }} state=absent
|
||||
|
||||
when: not scala_sbt_install
|
||||
tags: [ 'scala', 'sbt', 'scala_sbt' ]
|
Loading…
Reference in New Issue