openstack-ansible-os_magnum/templates/magnum-systemd-init.j2
Anton Khaldin e11d113c29 Implement Ubuntu 16.04 support with systemd
This change updates the magnum role to support Ubuntu 14.04 with
upstart init and 16.04 with systemd init.

Change-Id: Id3b3b9a5419c3602821e8f7b062a5958efcccb0c
Implements: blueprint support-ubuntu-1604
2016-07-25 23:58:41 -07:00

26 lines
663 B
Django/Jinja

# {{ ansible_managed }}
[Unit]
Description=magnum openstack service
After=syslog.target
After=network.target
[Service]
Type=simple
User={{ system_user }}
Group={{ system_group }}
{% if program_override is defined %}
ExecStart={{ program_override }} {{ program_config_options|default('') }} --log-file=/var/log/magnum/{{ program_name }}.log
{% else %}
ExecStart={{ magnum_bin }}/{{ program_name }} {{ program_config_options|default('') }} --log-file=/var/log/magnum/{{ program_name }}.log
{% endif %}
# 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