Change-Id: Iffb55fee41b8398de12554b58a9d36ae2b81e7ffpull/101/head
printf "This is [company name] network.\n" | printf "This is [company name] network.\n" | ||||
printf "Unauthorized access strictly prohibited.\n" | printf "Unauthorized access strictly prohibited.\n" | ||||
Services | |||||
~~~~~~~~ | |||||
Stop and disable linux service: | |||||
.. code-block:: yaml | |||||
linux: | |||||
system: | |||||
service: | |||||
apt-daily.timer: | |||||
status: dead | |||||
Possible status is dead (disable service by default), running (enable service by default), enabled, disabled. | |||||
RHEL / CentOS | RHEL / CentOS | ||||
^^^^^^^^^^^^^ | ^^^^^^^^^^^^^ | ||||
{%- if system.netconsole is defined %} | {%- if system.netconsole is defined %} | ||||
- linux.system.netconsole | - linux.system.netconsole | ||||
{%- endif %} | {%- endif %} | ||||
{%- if system.service is defined %} | |||||
- linux.system.service | |||||
{%- endif %} |
{%- from "linux/map.jinja" import system with context %} | |||||
{%- if system.enabled %} | |||||
{%- for name, service in system.service.iteritems() %} | |||||
linux_service_{{ name }}: | |||||
service.{{ service.status }}: | |||||
{%- if service.status == 'dead' %} | |||||
- enable: {{ service.get('enabled', False) }} | |||||
{%- elif service.status == 'running' %} | |||||
- enable: {{ service.get('enabled', True) }} | |||||
{%- endif %} | |||||
- name: {{ name }} | |||||
{%- endfor %} | |||||
{%- endif %} |