---
- hosts: all
  tasks:

  - name: "Download and run Jabba install - Java Version Manager (cross plataform)"
    # get_url:
    #   url: https://github.com/shyiko/jabba/raw/master/install.sh
    #   dest: /tmp
    shell: "curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh"

  - name: "Turn jabba to exec file"
    shell: "chmod +x $HOME/.jabba/bin/jabba"

  - name: "Add jabba to class path"
    become: true
    shell: "ln -s $HOME/.jabba/jabba.sh /usr/local/bin/jabba"

  tags: 
    - java
    - jvm
    - programming languages

---
- hosts: all
  tasks:

  - name: "Download and run Jabba install - Java Version Manager (cross plataform)"
    # get_url:
    #   url: https://github.com/shyiko/jabba/raw/master/install.sh
    #   dest: /tmp
    shell: "curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh"

  - name: "Turn jabba to exec file"
    shell: "chmod +x $HOME/.jabba/bin/jabba"

  - name: "Add jabba to class path"
    become: true
    shell: "ln -s $HOME/.jabba/jabba.sh /usr/local/bin/jabba"

  - name: "Install Java 1.9.0"
    shell: "jabba install 1.9.0-181"

  tags: 
    - java
    - jvm
    - programming languages

Add install java 1.9.0 step
[feature/java] Add install java 1.9.0 step
