File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ resource "nomad_job" "ldap" {
16
16
admin_password = var.admin_password
17
17
basedn = var.basedn
18
18
organization = var.organization
19
+
20
+ # LDIF templates which are only applied when the data directory is empty (first run)
19
21
ldif = jsonencode ({
20
22
" root" = file (" ${ path . module } /ldif/root.ldif" )
21
23
})
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ variable "organization" {
79
79
// LOCALS
80
80
81
81
locals {
82
- data_path = " /bitnami/openldap/data "
82
+ data_path = " /bitnami/openldap"
83
83
ldif_path = " ${ NOMAD_ALLOC_DIR } /data/ldif"
84
84
schema_path = " ${ NOMAD_ALLOC_DIR } /data/schema"
85
85
}
@@ -115,7 +115,7 @@ job "openldap" {
115
115
network {
116
116
port "ldap" {
117
117
static = var. port
118
- to = 389
118
+ to = 1389
119
119
}
120
120
}
121
121
@@ -167,15 +167,15 @@ job "openldap" {
167
167
LDAP_ADD_SCHEMAS = " yes"
168
168
LDAP_EXTRA_SCHEMAS = " cosine, inetorgperson, nis"
169
169
LDAP_SKIP_DEFAULT_TREE = " yes"
170
- LDAP_CUSTOM_LDIF_DIR = " " // local.ldif_path
171
- LDAP_CUSTOM_SCHEMA_DIR = " " // local.schema_path
170
+ LDAP_CUSTOM_LDIF_DIR = local. ldif_path
171
+ LDAP_CUSTOM_SCHEMA_DIR = local. schema_path
172
172
}
173
173
174
174
config {
175
175
image = var. docker_image
176
176
force_pull = var. docker_always_pull
177
177
volumes = compact ([
178
- format (" %s:%s" , var. data , local. data_path ),
178
+ format (" %s:%s/data " , var. data , local. data_path ),
179
179
])
180
180
ports = [" ldap" ]
181
181
}
You can’t perform that action at this time.
0 commit comments