Make systemd unit file install

.. without running other tasks
This commit is contained in:
Egon Rijpkema 2018-09-17 13:40:50 +02:00
parent 11f660a51f
commit 5ab3e6565e
2 changed files with 12 additions and 0 deletions

View File

@ -2,6 +2,8 @@
- hosts: all - hosts: all
name: Dummy to gather facts name: Dummy to gather facts
tasks: [] tasks: []
tags:
- facts
- hosts: cinder-controller - hosts: cinder-controller
become: True become: True

View File

@ -4,6 +4,8 @@
include_vars: include_vars:
file: ../../secrets.yml file: ../../secrets.yml
name: secrets name: secrets
tags:
- facts
- set_fact: - set_fact:
docker_image: registry.webhosting.rug.nl/hpc/openstack-cinder-controller:latest docker_image: registry.webhosting.rug.nl/hpc/openstack-cinder-controller:latest
@ -21,6 +23,8 @@
-e "RABBIT_PASSWORD={{ secrets['RABBIT_PASSWORD'] }}" -e "RABBIT_PASSWORD={{ secrets['RABBIT_PASSWORD'] }}"
-e "RABBIT_USER=openstack" -e "RABBIT_USER=openstack"
-e "RBD_SECRET_UUID={{ secrets['CINDER_RBD_SECRET_UUID']}}" -e "RBD_SECRET_UUID={{ secrets['CINDER_RBD_SECRET_UUID']}}"
tags:
- facts
- name: pull docker image - name: pull docker image
docker_image: docker_image:
@ -43,11 +47,17 @@
mode: 644 mode: 644
owner: root owner: root
group: root group: root
tags:
- systemd
- name: start service at boot. - name: start service at boot.
command: systemctl reenable cinder-controller.service command: systemctl reenable cinder-controller.service
tags:
- systemd
- command: systemctl daemon-reload - command: systemctl daemon-reload
tags:
- systemd
- name: Initialize database. - name: Initialize database.
command: > command: >