Installing java from local file will not work as expected

SUMMARY

Tried the point in the README installing from local file.
I've download the jdk11 from oracle and store it into directory /home/lars/Downloads, set transport_local to /home/lars/Downloads/jdk-11.0.2_linux-x64_bin.tar.gz
And I want to set the java_path to /opt/java
ISSUE TYPE

Bug Report

COMPONENT NAME

ANSIBLE VERSION

ansible 2.7.8
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/lars/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.6.8 (default, Jan  2 2019, 05:35:58) [GCC 8.2.0]

CONFIGURATION

/etc/ansible/ansible.cfg
[defaults]
[inventory]
[privilege_escalation]
[paramiko_connection]
[ssh_connection]
[persistent_connection]
[accelerate]
[selinux]
[colors]
[diff]

OS / ENVIRONMENT

Linux Solus amd64
STEPS TO REPRODUCE

cat >java.yml <<EOF
---
- name: Install Java
  hosts: localhost

  roles:
    - role: lean_delivery.java
      transport: local
      transport_local: /home/lars/Downloads/jdk-11.0.2_linux-x64_bin.tar.gz
      java_path:   /opt/java
EOF

ansible-playbook java.yml

EXPECTED RESULTS

jdk 11 will install into /opt/java
ACTUAL RESULTS

[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Install Java] *************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************
ok: [localhost]

TASK [lean_delivery.java : Load a variable file based on distribution or OS family] *********************************************************************************************
ok: [localhost] => (item=/home/lars/.ansible/roles/lean_delivery.java/vars/default.yml)

TASK [lean_delivery.java : Choose platform based task] **************************************************************************************************************************
included: /home/lars/.ansible/roles/lean_delivery.java/tasks/System-Linux.yml for localhost

TASK [lean_delivery.java : Fetch oracle artifact with local transport] **********************************************************************************************************
included: /home/lars/.ansible/roles/lean_delivery.java/tasks/fetch/local.yml for localhost

TASK [lean_delivery.java : Artifact stored localy] ******************************************************************************************************************************
ok: [localhost]

TASK [lean_delivery.java : Split artifact name] *********************************************************************************************************************************
ok: [localhost]

TASK [lean_delivery.java : Set variables based on split] ************************************************************************************************************************
ok: [localhost]

TASK [lean_delivery.java : Copy artifact to destination] ************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'download_default_path' is undefined\n\nThe error appears to have been in '/home/lars/.ansible/roles/lean_delivery.java/tasks/fetch/local.yml': line 22, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Copy artifact to destination\n  ^ here\n"}
PLAY RECAP **********************************************************************************************************************************************************************
localhost                  : ok=7    changed=0    unreachable=0    failed=1

@LarsImNetz
I tried to run your playbook with ansible 2.7.8 on fresh Centos7 instance and it works as expected with provided artifact. I guess the root cause is your version of Linux ( Linux Solus, right? ) which is not compatible with RedHat or Debian installation scenarios. We don't have this version in our support list for now.
But as workaround you can try to fix it locally adding necessary variables on playbook level.
Try this code for example:
---
- name: Install Java
  hosts: localhost

  roles:
    - role: lean_delivery.java
      transport: local
      transport_local: /home/lars/Downloads/jdk-11.0.2_linux-x64_bin.tar.gz
      java_path:   /opt/java
      download_default_path: /tmp

In case of other failures occur - check the list of required variables from vars folder. For RedHat the list of variables looks like this:
extension: 'tar.gz'
java_default_path: /usr/java
download_default_path: /tmp
requirements:
  - redhat-lsb-core
  - policycoreutils-python
  - libsemanage-python
  - libselinux-python
  - python-argparse
  - unzip

You can add these variables to playbook and set them according to your environment. Hope this helps.

Thanks for fast answer. I update my playbook this way.
---

- name: Install Java
  hosts: localhost

  vars:
    extension: 'tar.gz'
    java_default_path: ""
    requirements:
  roles:
    - role: lean_delivery.java
      transport: local
      transport_local: /home/lars/Downloads/jdk-11.0.2_linux-x64_bin.tar.gz
      java_path:   /opt/java
      download_default_path: /tmp

This results in a new error message:
 [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Install Java] *************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************
ok: [localhost]

TASK [lean_delivery.java : Load a variable file based on distribution or OS family] *********************************************************************************************
ok: [localhost] => (item=/home/lars/.ansible/roles/lean_delivery.java/vars/default.yml)

TASK [lean_delivery.java : Choose platform based task] **************************************************************************************************************************
included: /home/lars/.ansible/roles/lean_delivery.java/tasks/System-Linux.yml for localhost

TASK [lean_delivery.java : Fetch oracle artifact with local transport] **********************************************************************************************************
included: /home/lars/.ansible/roles/lean_delivery.java/tasks/fetch/local.yml for localhost

TASK [lean_delivery.java : Artifact stored localy] ******************************************************************************************************************************
ok: [localhost]

TASK [lean_delivery.java : Split artifact name] *********************************************************************************************************************************
ok: [localhost]

TASK [lean_delivery.java : Set variables based on split] ************************************************************************************************************************
ok: [localhost]

TASK [lean_delivery.java : Copy artifact to destination] ************************************************************************************************************************
ok: [localhost]

TASK [lean_delivery.java : Downloaded artifact] *********************************************************************************************************************************
ok: [localhost]

TASK [lean_delivery.java : Set java full version] *******************************************************************************************************************************
ok: [localhost]

TASK [lean_delivery.java : Install requirements] ********************************************************************************************************************************
FAILED - RETRYING: Install requirements (3 retries left).
FAILED - RETRYING: Install requirements (2 retries left).
FAILED - RETRYING: Install requirements (1 retries left).
fatal: [localhost]: FAILED! => {"attempts": 3, "changed": false, "msg": "Could not find a module for unknown."}
	to retry, use: --limit @/home/lars/develop/pull-test-ansible/java.retry

PLAY RECAP **********************************************************************************************************************************************************************
localhost                  : ok=10   changed=0    unreachable=0    failed=1

The problem seems to be the installer for packages, in solus it calls eopkg, not deb nor apt nor apt-get nor yum.
IMHO, I hate it. Every distro has it's own package manager.

@LarsImNetz
Yes, you're right about package manager. There's no ansible module for eopkg. So, adding support for Solus requires additional code with command and shell modules. We don't have such items in our roadmap at the moment. You can add it yourself and raise pull request to our repo if you like.


Formatting Post Preview Descriptions

I was looking to add the description to the post previews, so I added withDesc to /posts. However, the descriptions appear on the right side of the post titles (see image below).
Is there any way to move the descriptions to underneath the titles? Thanks!

Hey @nhtsai I've just updated the theme in #258, it's a small change to this line, so hopefully that fixes your issues