Skip to content

Commit 7a10113

Browse files
committed
Podman consider quotes as part of the value, unlike shell
1 parent 4bcda33 commit 7a10113

2 files changed

Lines changed: 43 additions & 43 deletions

File tree

mgradm/shared/templates/serverEnvironmentTemplate.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,42 +14,42 @@ import (
1414

1515
const envTemplate = `# uyuni-server environment, generated by mgradm
1616
{{- if .TZ }}
17-
TZ="{{ .TZ }}"
17+
TZ={{ .TZ }}
1818
{{- end -}}
1919
{{- if .Fqdn }}
20-
UYUNI_HOSTNAME="{{ .Fqdn }}"
20+
UYUNI_HOSTNAME={{ .Fqdn }}
2121
{{- end -}}
2222
{{- if .Email }}
23-
EMAIL="{{ .Email }}"
23+
EMAIL={{ .Email }}
2424
{{- end -}}
2525
{{- if .EmailFrom }}
26-
EMAILFROM="{{ .EmailFrom }}"
26+
EMAILFROM={{ .EmailFrom }}
2727
{{- end -}}
2828
{{- if .DB }}
29-
MANAGER_DB_NAME="{{ .DB.Name }}"
30-
MANAGER_DB_HOST="{{ .DB.Host }}"
31-
MANAGER_DB_PORT="{{ .DB.GetPort }}"
29+
MANAGER_DB_NAME={{ .DB.Name }}
30+
MANAGER_DB_HOST={{ .DB.Host }}
31+
MANAGER_DB_PORT={{ .DB.GetPort }}
3232
{{- if not .DB.IsLocal }}
33-
EXTERNALDB_PROVIDER="{{ .DB.Provider }}"
33+
EXTERNALDB_PROVIDER={{ .DB.Provider }}
3434
{{- end -}}
3535
{{- end -}}
3636
{{- if .ReportDB }}
37-
REPORT_DB_NAME="{{ .ReportDB.Name }}"
38-
REPORT_DB_HOST="{{ .ReportDB.Host }}"
39-
REPORT_DB_PORT="{{ .ReportDB.GetPort }}"
37+
REPORT_DB_NAME={{ .ReportDB.Name }}
38+
REPORT_DB_HOST={{ .ReportDB.Host }}
39+
REPORT_DB_PORT={{ .ReportDB.GetPort }}
4040
{{- end -}}
4141
{{- if .Debug }}
42-
DEBUG_JAVA="{{ .Debug }}"
42+
DEBUG_JAVA={{ .Debug }}
4343
{{- end -}}
4444
{{- if .Org }}
45-
ORGANIZATION="{{ .Org }}"
45+
ORGANIZATION={{ .Org }}
4646
{{- end -}}
4747
{{- if .Admin }}
48-
ADMIN_FIRSTNAME="{{ .Admin.FirstName }}"
49-
ADMIN_LASTNAME="{{ .Admin.LastName }}"
48+
ADMIN_FIRSTNAME={{ .Admin.FirstName }}
49+
ADMIN_LASTNAME={{ .Admin.LastName }}
5050
{{- end -}}
5151
{{ if .HasMirror }}
52-
MIRROR_PATH="/mirror"
52+
MIRROR_PATH=/mirror
5353
{{- end -}}
5454
`
5555

mgradm/shared/templates/templates_test.go

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -184,19 +184,19 @@ WantedBy=multi-user.target default.target
184184
HasMirror: false,
185185
},
186186
expected: `# uyuni-server environment, generated by mgradm
187-
TZ="GMT"
188-
UYUNI_HOSTNAME="uyuni-server.example.com"
189-
EMAIL="admin@example.com"
190-
EMAILFROM="notifications@example.com"
191-
MANAGER_DB_NAME="mlm"
192-
MANAGER_DB_HOST="db"
193-
MANAGER_DB_PORT="5432"
194-
REPORT_DB_NAME="reportdb"
195-
REPORT_DB_HOST="reportdb"
196-
REPORT_DB_PORT="5432"
197-
ORGANIZATION="Example.com"
198-
ADMIN_FIRSTNAME="Test"
199-
ADMIN_LASTNAME="Admin"`,
187+
TZ=GMT
188+
UYUNI_HOSTNAME=uyuni-server.example.com
189+
EMAIL=admin@example.com
190+
EMAILFROM=notifications@example.com
191+
MANAGER_DB_NAME=mlm
192+
MANAGER_DB_HOST=db
193+
MANAGER_DB_PORT=5432
194+
REPORT_DB_NAME=reportdb
195+
REPORT_DB_HOST=reportdb
196+
REPORT_DB_PORT=5432
197+
ORGANIZATION=Example.com
198+
ADMIN_FIRSTNAME=Test
199+
ADMIN_LASTNAME=Admin`,
200200
},
201201
{
202202
name: "ServerEnvironmentDataExternalDB",
@@ -213,20 +213,20 @@ ADMIN_LASTNAME="Admin"`,
213213
HasMirror: false,
214214
},
215215
expected: `# uyuni-server environment, generated by mgradm
216-
TZ="GMT"
217-
UYUNI_HOSTNAME="uyuni-server.example.com"
218-
EMAIL="admin@example.com"
219-
EMAILFROM="notifications@example.com"
220-
MANAGER_DB_NAME="mlm"
221-
MANAGER_DB_HOST="db.example.com"
222-
MANAGER_DB_PORT="5431"
223-
EXTERNALDB_PROVIDER="aws"
224-
REPORT_DB_NAME="reportdb"
225-
REPORT_DB_HOST="reportdb.example.com"
226-
REPORT_DB_PORT="5432"
227-
ORGANIZATION="My Example.com"
228-
ADMIN_FIRSTNAME="Test"
229-
ADMIN_LASTNAME="Admin"`,
216+
TZ=GMT
217+
UYUNI_HOSTNAME=uyuni-server.example.com
218+
EMAIL=admin@example.com
219+
EMAILFROM=notifications@example.com
220+
MANAGER_DB_NAME=mlm
221+
MANAGER_DB_HOST=db.example.com
222+
MANAGER_DB_PORT=5431
223+
EXTERNALDB_PROVIDER=aws
224+
REPORT_DB_NAME=reportdb
225+
REPORT_DB_HOST=reportdb.example.com
226+
REPORT_DB_PORT=5432
227+
ORGANIZATION=My Example.com
228+
ADMIN_FIRSTNAME=Test
229+
ADMIN_LASTNAME=Admin`,
230230
},
231231
{
232232
name: "ServerEnvironmentEmptyData",

0 commit comments

Comments
 (0)