---
# Common tasks applicable to both Oracle and OpenJDK

# this directory will contain the Java downloads
- name: Install Java download directory (local)
  tags:
    - java
    - download
  local_action: file
    state=directory
    owner=0
    group=0
    mode=2777
    dest={{ local_ansible_data_path }}


# this directory will get copies of large files
- name: Install remote ansible data path directory
  tags: teamcity
  file:
    state=directory
    dest={{ remote_ansible_data_path }}


# Test whether we need to download Java.
- name: Install Oracle Java redis package sha256sum (local)
  tags:
    - java
    - download
  local_action: template
    src=sha256sum.j2
    dest={{ local_ansible_data_path }}/java.sha256sum
    mode=0644


# Updating the package cache at least once is mandatory for apt
- name: Update apt package cache
  tags: java
  when: ansible_os_family == 'Debian'
  apt:
    update_cache=yes
    cache_valid_time=3600


# Ansile requirement if SELinux is enabled
- include: selinux.yml

---
# Common tasks applicable to both Oracle and OpenJDK

# this directory will contain the Java downloads
- name: Install local ansible data path directory (local)
  tags:
    - java
    - download
  local_action: file
    state=directory
    owner=0
    group=0
    mode=2777
    dest={{ local_ansible_data_path }}


# this directory will get copies of large files
- name: Install remote ansible data path directory
  tags: teamcity
  file:
    state=directory
    dest={{ remote_ansible_data_path }}


# Test whether we need to download Java.
- name: Install Oracle Java redis package sha256sum (local)
  tags:
    - java
    - download
  local_action: template
    src=sha256sum.j2
    dest={{ local_ansible_data_path }}/java.sha256sum
    mode=0644


# Updating the package cache at least once is mandatory for apt
- name: Update apt package cache
  tags: java
  when: ansible_os_family == 'Debian'
  apt:
    update_cache=yes
    cache_valid_time=3600


# Ansile requirement if SELinux is enabled
- include: selinux.yml

Update task description for local ansible data path directory creation
Update task description for local ansible data path directory creation
