forked from ISTI-ansible-roles/ansible-roles
library/roles/hadoop/CDH: zeppelin wants to write inside its conf directory. Added a systemd startup script.
This commit is contained in:
parent
b318a4f16d
commit
ee8ceb8978
|
@ -18,6 +18,9 @@
|
|||
args:
|
||||
creates: '{{ cdh_zeppelin_home }}/{{ cdh_zeppelin_dir }}'
|
||||
|
||||
- name: zeppelin wants to write into the conf directory
|
||||
file: dest={{ cdh_zeppelin_home }}/{{ cdh_zeppelin_dir }}/conf owner={{ cdh_zeppelin_user }} group={{ cdh_zeppelin_group }}
|
||||
|
||||
- name: Install the zeppelin env file
|
||||
template: src=zeppelin-env.sh dest={{ cdh_zeppelin_home }}/{{ cdh_zeppelin_dir }}/conf/zeppelin-env.sh owner=root group=root mode=0444
|
||||
notify: Restart zeppelin
|
||||
|
@ -26,6 +29,10 @@
|
|||
template: src=zeppelin_upstart.conf dest=/etc/init/zeppelin.conf
|
||||
when: ansible_service_mgr != 'systemd'
|
||||
|
||||
- name: Install the zeppelin systemd startup script
|
||||
template: src=zeppelin_systemd.service dest=/etc/systemd/system/zeppelin.service
|
||||
when: ansible_service_mgr == 'systemd'
|
||||
|
||||
- name: Ensure that the zeppelin service is enabled and running
|
||||
service: name=zeppelin state=started enabled=yes
|
||||
|
||||
|
@ -33,4 +40,4 @@
|
|||
service: name=apache2 state=stopped enabled=no
|
||||
notify: Restart nginx
|
||||
|
||||
tags: [ 'cdh', 'zeppelin' ]
|
||||
tags: [ 'cdh', 'zeppelin' ]
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Zeppelin
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
|
||||
User={{ cdh_zeppelin_user }}
|
||||
Group={{ cdh_zeppelin_group }}
|
||||
|
||||
WorkingDirectory={{ cdh_zeppelin_home }}/{{ cdh_zeppelin_dir }}
|
||||
ExecStart={{ cdh_zeppelin_home }}/{{ cdh_zeppelin_dir }}/bin/zeppelin-daemon.sh upstart
|
Loading…
Reference in New Issue