2021-03-09 04:57:33 +00:00
|
|
|
- name: systemd daemon-reload
|
|
|
|
systemd:
|
|
|
|
daemon_reload: yes
|
|
|
|
|
|
|
|
|
2021-04-15 19:21:35 +00:00
|
|
|
- name: Enable & Restart jupyterhub.service
|
2021-03-09 04:57:33 +00:00
|
|
|
systemd:
|
2021-04-15 19:21:35 +00:00
|
|
|
name: jupyterhub
|
2021-03-09 04:57:33 +00:00
|
|
|
enabled: yes
|
|
|
|
state: restarted
|
2021-03-11 22:24:05 +00:00
|
|
|
when: jupyterhub_enabled
|
2021-03-09 04:57:33 +00:00
|
|
|
|
2021-04-15 19:21:35 +00:00
|
|
|
- name: Disable jupyterhub.service
|
2021-03-09 04:57:33 +00:00
|
|
|
systemd:
|
2021-04-15 19:21:35 +00:00
|
|
|
name: jupyterhub
|
2021-03-09 04:57:33 +00:00
|
|
|
enabled: no
|
|
|
|
state: stopped
|
2021-03-11 22:24:05 +00:00
|
|
|
when: not jupyterhub_enabled
|
2021-03-09 04:57:33 +00:00
|
|
|
|
|
|
|
|
2021-04-17 11:43:04 +00:00
|
|
|
- name: "Install from template: {{ nginx_conf_dir }}/jupyterhub-nginx.conf"
|
2021-03-10 05:15:15 +00:00
|
|
|
template:
|
2021-03-11 22:24:05 +00:00
|
|
|
src: jupyterhub-nginx.conf
|
2021-03-10 05:15:15 +00:00
|
|
|
dest: "{{ nginx_conf_dir }}/"
|
2021-03-11 22:24:05 +00:00
|
|
|
when: jupyterhub_enabled
|
2021-03-10 05:15:15 +00:00
|
|
|
|
2021-04-15 19:21:35 +00:00
|
|
|
- name: Disable {{ nginx_conf_dir }}/jupyterhub-nginx.conf
|
2021-03-10 05:15:15 +00:00
|
|
|
file:
|
2021-03-11 22:24:05 +00:00
|
|
|
path: "{{ nginx_conf_dir }}/jupyterhub-nginx.conf"
|
2021-03-10 05:15:15 +00:00
|
|
|
state: absent
|
2021-03-11 22:24:05 +00:00
|
|
|
when: not jupyterhub_enabled
|
2021-03-10 05:15:15 +00:00
|
|
|
|
|
|
|
- name: Restart 'nginx' systemd service
|
|
|
|
systemd:
|
|
|
|
name: nginx
|
|
|
|
state: restarted
|