openstack-ansible-os_gnocchi/templates/gnocchi-systemd-init.j2
Travis Truman 46a58b7851 Disable gnocchi-api service when mod_wsgi is used
The *_services dict pattern present in other roles
has been adopted and systemd/upstart service enablement
of the gnocchi-api service is now directly tied to the
state of `gnocchi_use_mod_wsgi`.

Change-Id: Ibc15c37bbd5a1a70b0774a1184b5759e558a0efb
Closes-Bug: #1633205
2016-11-09 15:05:25 -05:00

22 lines
530 B
Django/Jinja

# {{ ansible_managed }}
[Unit]
Description=gnocchi openstack service
After=syslog.target
After=network.target
[Service]
Type=simple
User={{ gnocchi_system_user_name }}
Group={{ gnocchi_system_group_name }}
ExecStart={{ gnocchi_bin }}/{{ item.value.service_name }} {{ program_config_options|default('') }} --log-file=/var/log/gnocchi/{{ item.value.service_name }}.log
# Give a reasonable amount of time for the server to start up/shut down
TimeoutSec=300
Restart=on-failure
RestartSec=150
[Install]
WantedBy=multi-user.target