]> git.openstreetmap.org Git - chef.git/blob - cookbooks/systemd/templates/default/service.erb
Canonicalise ordering of array attributes for services
[chef.git] / cookbooks / systemd / templates / default / service.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 [Unit]
4 <% if @description -%>
5 Description=<%= @description %>
6 <% end -%>
7 <% if @condition_path_exists -%>
8 ConditionPathExists=<%= Array(@condition_path_exists).join(" ") %>
9 <% end -%>
10 <% if @condition_path_exists_glob -%>
11 ConditionPathExistsGlob=<%= Array(@condition_path_exists_glob).join(" ") %>
12 <% end -%>
13 <% if @after -%>
14 After=<%= Array(@after).join(" ") %>
15 <% end -%>
16 <% if @conflicts -%>
17 Conflicts=<%= Array(@conflicts).join(" ") %>
18 <% end -%>
19 <% if @wants -%>
20 Wants=<%= Array(@wants).join(" ") %>
21 <% end -%>
22
23 [Service]
24 <% if @type -%>
25 Type=<%= @type %>
26 <% end -%>
27 <% if @limit_nofile -%>
28 LimitNOFILE=<%= @limit_nofile %>
29 <% end -%>
30 <% if @limit_as -%>
31 LimitAS=<%= @limit_as %>
32 <% end -%>
33 <% if @limit_cpu -%>
34 LimitCPU=<%= @limit_cpu %>
35 <% end -%>
36 <% if @memory_low -%>
37 MemoryLow=<%= @memory_low %>
38 <% end -%>
39 <% if @memory_high -%>
40 MemoryHigh=<%= @memory_high %>
41 <% end -%>
42 <% if @memory_max -%>
43 MemoryMax=<%= @memory_max %>
44 <% end -%>
45 <% @environment.each do |name,value| -%>
46 Environment="<%= name %>=<%= value %>"
47 <% end -%>
48 <% if @environment_file -%>
49 EnvironmentFile=<%= @environment_file %>
50 <% end -%>
51 <% if @user -%>
52 User=<%= @user %>
53 <% end -%>
54 <% if @group -%>
55 Group=<%= @group %>
56 <% end -%>
57 <% if @working_directory -%>
58 WorkingDirectory=<%= @working_directory %>
59 <% end -%>
60 <% if @exec_start_pre -%>
61 <% if @dropin -%>
62 ExecStartPre=
63 <% end -%>
64 ExecStartPre=<%= @exec_start_pre %>
65 <% end -%>
66 <% if @exec_start -%>
67 <% if @dropin -%>
68 ExecStart=
69 <% end -%>
70 ExecStart=<%= @exec_start %>
71 <% end -%>
72 <% if @exec_start_post -%>
73 <% if @dropin -%>
74 ExecStartPost=
75 <% end -%>
76 ExecStartPost=<%= @exec_start_post %>
77 <% end -%>
78 <% if @exec_stop -%>
79 <% if @dropin -%>
80 ExecStop=
81 <% end -%>
82 ExecStop=<%= @exec_stop %>
83 <% end -%>
84 <% if @exec_reload -%>
85 <% if @dropin -%>
86 ExecReload=
87 <% end -%>
88 ExecReload=<%= @exec_reload %>
89 <% end -%>
90 <% if @runtime_directory -%>
91 RuntimeDirectory=<%= @runtime_directory %>
92 <% end -%>
93 <% if @runtime_directory_mode -%>
94 RuntimeDirectoryMode=<%= sprintf("0%o", @runtime_directory_mode) %>
95 <% end -%>
96 <% if @runtime_max_sec -%>
97 RuntimeMaxSec=<%= @runtime_max_sec %>
98 <% end -%>
99 <% if @standard_input -%>
100 StandardInput=<%= @standard_input %>
101 <% end -%>
102 <% if @standard_output -%>
103 StandardOutput=<%= @standard_output %>
104 <% end -%>
105 <% if @standard_error -%>
106 StandardError=<%= @standard_error %>
107 <% end -%>
108 <% if @protect_proc -%>
109 ProtectProc=<%= @protect_proc %>
110 <% end -%>
111 <% if @proc_subset -%>
112 ProcSubset=<%= @proc_subset %>
113 <% end -%>
114 <% if @no_new_privileges -%>
115 NoNewPrivileges=<%= @no_new_privileges %>
116 <% end -%>
117 <% if @capability_bounding_set -%>
118 CapabilityBoundingSet=<%= Array(@capability_bounding_set).sort.uniq.join(" ") %>
119 <% end -%>
120 <% if @protect_system -%>
121 ProtectSystem=<%= @protect_system %>
122 <% end -%>
123 <% if @protect_home -%>
124 ProtectHome=<%= @protect_home %>
125 <% end -%>
126 <% if @read_write_paths -%>
127 ReadWritePaths=<%= Array(@read_write_paths).sort.uniq.join(" ") %>
128 <% end -%>
129 <% if @read_only_paths -%>
130 ReadOnlyPaths=<%= Array(@read_only_paths).sort.uniq.join(" ") %>
131 <% end -%>
132 <% if @inaccessible_paths -%>
133 InaccessiblePaths=<%= Array(@inaccessible_paths).sort.uniq.join(" ") %>
134 <% end -%>
135 <% if @private_tmp -%>
136 PrivateTmp=<%= @private_tmp %>
137 <% end -%>
138 <% if @private_devices -%>
139 PrivateDevices=<%= @private_devices %>
140 <% end -%>
141 <% if @private_network -%>
142 PrivateNetwork=<%= @private_network %>
143 <% end -%>
144 <% if @private_ipc -%>
145 PrivateIPC=<%= @private_ipc %>
146 <% end -%>
147 <% if @private_users -%>
148 PrivateUsers=<%= @private_users %>
149 <% end -%>
150 <% if @protect_hostname -%>
151 ProtectHostname=<%= @protect_hostname %>
152 <% end -%>
153 <% if @protect_clock -%>
154 ProtectClock=<%= @protect_clock %>
155 <% end -%>
156 <% if @protect_kernel_tunables -%>
157 ProtectKernelTunables=<%= @protect_kernel_tunables %>
158 <% end -%>
159 <% if @protect_kernel_modules -%>
160 ProtectKernelModules=<%= @protect_kernel_modules %>
161 <% end -%>
162 <% if @protect_kernel_logs -%>
163 ProtectKernelLogs=<%= @protect_kernel_logs %>
164 <% end -%>
165 <% if @protect_control_groups -%>
166 ProtectControlGroups=<%= @protect_control_groups %>
167 <% end -%>
168 <% if @restrict_address_families -%>
169 RestrictAddressFamilies=<%= Array(@restrict_address_families).sort.uniq.join(" ") %>
170 <% end -%>
171 <% if @restrict_namespaces -%>
172 RestrictNamespaces=<%= Array(@restrict_namespaces).sort.uniq.join(" ") %>
173 <% end -%>
174 <% if @lock_personality -%>
175 LockPersonality=<%= @lock_personality %>
176 <% end -%>
177 <% if @memory_deny_write_execute -%>
178 MemoryDenyWriteExecute=<%= @memory_deny_write_execute %>
179 <% end -%>
180 <% if @restrict_realtime -%>
181 RestrictRealtime=<%= @restrict_realtime %>
182 <% end -%>
183 <% if @restrict_suid_sgid -%>
184 RestrictSUIDSGID=<%= @restrict_suid_sgid %>
185 <% end -%>
186 <% if @remove_ipc -%>
187 RemoveIPC=<%= @remove_ipc %>
188 <% end -%>
189 <% if @system_call_filter -%>
190 SystemCallFilter=<%= Array(@system_call_filter).join(" ") %>
191 <% end -%>
192 <% if @system_call_architectures -%>
193 SystemCallArchitectures=<%= Array(@system_call_architectures).sort.uniq.join(" ") %>
194 <% end -%>
195 <% if @tasks_max -%>
196 TasksMax=<%= @tasks_max %>
197 <% end -%>
198 <% if @success_exit_status -%>
199 SuccessExitStatus=<%= Array(@success_exit_status).join(" ") %>
200 <% end -%>
201 <% if @restart -%>
202 Restart=<%= @restart %>
203 <% end -%>
204 <% if @timeout_start_sec -%>
205 TimeoutStartSec=<%= @timeout_start_sec %>
206 <% end -%>
207 <% if @timeout_stop_sec -%>
208 TimeoutStopSec=<%= @timeout_stop_sec %>
209 <% end -%>
210 <% if @timeout_abort_sec -%>
211 TimeoutAbortSec=<%= @timeout_abort_sec %>
212 <% end -%>
213 <% if @timeout_sec -%>
214 TimeoutSec=<%= @timeout_sec %>
215 <% end -%>
216 <% if @pid_file -%>
217 PIDFile=<%= @pid_file %>
218 <% end -%>
219 <% if @nice -%>
220 Nice=<%= @nice %>
221 <% end -%>
222 <% if @io_scheduling_class -%>
223 IOSchedulingClass=<%= @io_scheduling_class %>
224 <% end -%>
225 <% if @io_scheduling_priority -%>
226 IOSchedulingPriority=<%= @io_scheduling_priority %>
227 <% end -%>
228 <% if @kill_mode -%>
229 KillMode=<%= @kill_mode %>
230 <% end -%>
231 <% unless @dropin -%>
232
233 [Install]
234 WantedBy=multi-user.target
235 <% end -%>