openstack-ansible-os_sahara/templates/sahara-systemd-init.j2
Flávio Ramalho 95e4f4877b Role cleanup/update for ocata
- Use dictionary for service group mappings, bringing the
  role into line with the method used in other roles;

- Use systemd module instead of shell on the services
  restart handlers;

- Use ansible package module to install distro packages;

- Added variables for CentOS. The role should now support
  CentOS;

- Removed extras folder.

Change-Id: I5c8430804aacceca01c5821ca2528514033d15f4
2017-02-14 09:35:30 -03:00

26 lines
720 B
Django/Jinja

# {{ ansible_managed }}
[Unit]
Description=sahara openstack service
After=syslog.target
After=network.target
[Service]
Type=simple
User={{ sahara_system_user_name }}
Group={{ sahara_system_group_name }}
{% if program_override is defined %}
ExecStart={{ program_override }} {{ program_config_options|default('') }} --log-file=/var/log/sahara/{{ item.value.service_name }}.log
{% else %}
ExecStart={{ sahara_bin }}/{{ item.value.service_name }} {{ program_config_options|default('') }} --log-file=/var/log/sahara/{{ item.value.service_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