ansible-role-hadoop-cdh/tasks/cdh_deb.yml

37 lines
1.2 KiB
YAML

---
- name: Deb packages
block:
- name: apt key for the Cloudera Manager repository
apt_key: url='{{ cdh_ubuntu_repo_key }}' state=present
- name: Disable the signature check, because the signature is too old
copy: src=apt-99cloudera dest=/etc/apt/apt.conf.d/99cloudera owner=root mode='0644'
when: cdh_major_version <= 5
- name: Install the Cloudera CDH packages repository
apt_repository: repo='{{ cdh_ubuntu_packages_repo }}' update_cache=yes
- name: Install the CDH Manager server packages
apt: pkg={{ cdh_cm_deb_packages }} state=present cache_valid_time=1800
when: cdh_manager_install
- name: Install the CDH Manager agents and daemons
apt: pkg={{ cdh_agent_packages }} state=present cache_valid_time=1800
when: not cdh_manager_install
- name: Start and enable the scm agent
service: name=cloudera-scm-agent state=started enabled=yes
- name: "Check if apache is installed"
package_facts:
manager: "auto"
when: cdh_manager_install
- name: Stop and disable the apache service on CDM
service: name=apache2 state=stopped enabled=no
when:
- cdh_manager_install
- "'apache2' in ansible_facts.packages"
tags: [ 'cdh', 'hadoop' ]