ansible-desktop/roles/dev-java/tasks/arch.yml

37 lines
1.0 KiB
YAML

- name: "[Arch] install java"
become: yes
community.general.pacman:
name:
- jdk17-openjdk
- name: "[Arch] Download IntelliJ"
shell:
cmd:
yay -Sw --needed --noconfirm intellij-idea-ultimate-edition
- name: "[Arch] Build IntelliJ"
shell:
chdir: "{{ ansible_user_dir }}/.cache/yay/intellij-idea-ultimate-edition"
cmd:
makepkg --noconfirm || true
- name: "[Arch] Query version"
shell:
cmd:
yay -Ss intellij-idea-ultimate-edition | head -1 | awk '{print $2}'
register: version
- name: "[Arch] Install IntelliJ"
become: yes
community.general.pacman:
name:
- "{{ ansible_user_dir }}/.cache/yay/intellij-idea-ultimate-edition/intellij-idea-ultimate-edition-{{ version.stdout }}-x86_64.pkg.tar.zst"
- "{{ ansible_user_dir }}/.cache/yay/intellij-idea-ultimate-edition/intellij-idea-ultimate-edition-jre-{{ version.stdout }}-x86_64.pkg.tar.zst"
- name: "[Arch] Create symbolic link"
become: yes
file:
src: "/usr/bin/intellij-idea-ultimate-edition"
dest: "/usr/bin/idea"
state: link