Skip to content

Commit 6fccced

Browse files
committed
fix double-quote issue in env.j2
add notice on changing env taking effect
1 parent b125f78 commit 6fccced

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

chapter_11_ansible.asciidoc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -707,14 +707,10 @@ Here's what our template for the env file will looks like:
707707
[source,python]
708708
----
709709
DJANGO_DEBUG_FALSE=1
710-
DJANGO_SECRET_KEY="{{ secret_key }}"
711-
DJANGO_ALLOWED_HOSTS="{{ host }}"
710+
DJANGO_SECRET_KEY={{ secret_key }}
711+
DJANGO_ALLOWED_HOSTS={{ host }}
712712
----
713713
====
714-
// CSANAD: we named the allowed hosts' env variable in plural form, as it's
715-
// named in settings.py but we pass one value, so it feels weird.
716-
//
717-
// I'd suggest DJANGO_ALLOWED_HOSTS="{{ hostname }}"
718714

719715
And here's how we use it in the provisioning script:
720716

@@ -751,6 +747,12 @@ And here's how we use it in the provisioning script:
751747

752748
<2> `force: false` means we will only write the file once.
753749
So after the first time we generate our secret key, it won't change.
750+
// CSANAD: but it also means any change we make in the .env would not take
751+
// effect until we manually delete the old superlists.env file from
752+
// the server.
753+
// We should mention this, because if the reader makes a mistake
754+
// in the env file, but then they find it, they won't be able to fix it unless
755+
// they realize this is why the values don't change. Guess how I learned that :)
754756

755757
<3> The `vars` section defines the variables we'll inject into our template.
756758

0 commit comments

Comments
 (0)