hpc-cloud/roles/horizon/tasks/main.yml

45 lines
928 B
YAML

# Run hpc/horizon
---
- set_fact:
docker_image: registry.webhosting.rug.nl/hpc/openstack-horizon-merlin:latest
- name: pull docker image
docker_image:
name: "{{ docker_image }}"
force: True
tags: pull
- name: Make persistent directories
file:
path: /srv/horizon/certs
state: directory
mode: 0750
- name: install ssl files
template:
src: templates/certs/{{ item }}
dest: /srv/horizon/certs/{{ item }}
mode: 400
with_items:
- merlin.hpc.rug.nl.key
- merlin.hpc.rug.nl.crt
- DigiCertCA.crt
- name: install service file.
template:
src: templates/horizon.service
dest: /etc/systemd/system/horizon.service
mode: 644
owner: root
group: root
- command: systemctl daemon-reload
- name: start service at boot.
command: systemctl reenable horizon.service
- name: make sure service is started
systemd:
name: horizon.service
state: restarted