diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/zookeeper/tasks/Debian.yml b/core/src/epicli/data/common/ansible/playbooks/roles/zookeeper/tasks/Debian.yml new file mode 100644 index 0000000000..650261ab63 --- /dev/null +++ b/core/src/epicli/data/common/ansible/playbooks/roles/zookeeper/tasks/Debian.yml @@ -0,0 +1,7 @@ +--- +- name: Install Java package (Debian) + apt: + name: + - openjdk-8-jre-headless + update_cache: true + state: present diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/zookeeper/tasks/RedHat.yml b/core/src/epicli/data/common/ansible/playbooks/roles/zookeeper/tasks/RedHat.yml new file mode 100644 index 0000000000..27448b5aae --- /dev/null +++ b/core/src/epicli/data/common/ansible/playbooks/roles/zookeeper/tasks/RedHat.yml @@ -0,0 +1,7 @@ +--- +- name: Install Java package (RedHat) + yum: + name: + - java-1.8.0-openjdk-headless + update_cache: true + state: present diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/zookeeper/tasks/main.yml b/core/src/epicli/data/common/ansible/playbooks/roles/zookeeper/tasks/main.yml index ce4f14de98..bdcba7f88e 100644 --- a/core/src/epicli/data/common/ansible/playbooks/roles/zookeeper/tasks/main.yml +++ b/core/src/epicli/data/common/ansible/playbooks/roles/zookeeper/tasks/main.yml @@ -13,17 +13,11 @@ system: yes shell: "/usr/sbin/nologin" -- name: Install Java package - package: - name: "java-1.8.0-openjdk-headless" - state: present - when: ansible_os_family == "RedHat" - -- name: Install Java package - package: - name: "openjdk-8-jre-headless" - state: present - when: ansible_os_family == "Debian" +- name: Execute OS-specific tasks (zookeeper) + block: + - include_tasks: "{{ ansible_os_family }}.yml" + module_defaults: + yum: { lock_timeout: 300 } - name: Check if jmx exporter is available stat: @@ -145,4 +139,3 @@ - include_tasks: metrics.yml when: exporter.stat.exists -