diff --git a/configs.yml b/configs.yml index 7c63540..36e88aa 100644 --- a/configs.yml +++ b/configs.yml @@ -34,10 +34,6 @@ rust: - run: - rustup default stable -java: - - install: - - jdk-openjdk - pacman_hooks: - run: - sudo mkdir -p /etc/pacman.d/hooks diff --git a/playbook.yml b/playbook.yml index 51df890..c9beeba 100644 --- a/playbook.yml +++ b/playbook.yml @@ -18,6 +18,7 @@ - { role: markdown, tags: markdown } - { role: tor, tags: tor } - { role: sudoers, tags: sudoers } + - { role: java, tags: java } - { role: lilypond, tags: lilypond } - { role: latex, tags: latex } - { role: protonvpn, tags: protonvpn } diff --git a/roles/java/meta/main.yml b/roles/java/meta/main.yml new file mode 100644 index 0000000..edef5f0 --- /dev/null +++ b/roles/java/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - role: check-sudo diff --git a/roles/java/tasks/main.yml b/roles/java/tasks/main.yml new file mode 100644 index 0000000..0286036 --- /dev/null +++ b/roles/java/tasks/main.yml @@ -0,0 +1,14 @@ +--- +- name: Install java-openjdk (Archlinux) + become: true + pacman: + name: + - jdk-openjdk + when: ansible_distribution == 'Archlinux' + +- name: Install java-openjdk (Debian) + become: true + apt: + name: + - jdk-openjdk + when: ansible_distribution == 'Debian'