@@ -18,7 +18,7 @@ production Django deployments:
18
18
- RabbitMQ
19
19
20
20
Default settings are stored in ` roles/role_name/defaults/main.yml ` .
21
- Environment-specific settings are in the ` env_vars ` directory.
21
+ Environment-specific settings are in the ` group_vars ` directory.
22
22
23
23
A ` certbot ` role is also included for automatically generating and renewing
24
24
trusted SSL certificates with [ Let's Encrypt] [ lets-encrypt ] .
@@ -58,7 +58,7 @@ sudo apt-get update
58
58
59
59
### Configuring your application
60
60
61
- The main settings to change are in the [ ` env_vars/base.yml ` ] ( env_vars/base .yml)
61
+ The main settings to change are in the ` group_vars/[environment_name]/vars .yml`
62
62
file, where you can configure the location of your Git project, the project
63
63
name, and the application name which will be used throughout the Ansible
64
64
configuration.
@@ -230,8 +230,9 @@ The security module performs several basic server hardening tasks. Inspired by
230
230
** Security role configuration**
231
231
232
232
- Change the ` server_user ` from ` root ` to something else in ` roles/base/defaults/main.yml `
233
- - Change the sudo password in ` roles/security/defaults/main .yml`
233
+ - Change the sudo password in ` group_vars/[environment_name]/vars .yml`
234
234
- Change variables in ` ./roles/security/vars/ ` per your desired configuration
235
+ by overriding them in ` group_vars/[environment_name]/vars.yml `
235
236
236
237
** Running the Security role**
237
238
@@ -251,9 +252,6 @@ Create an inventory file for the environment, for example:
251
252
```
252
253
# development
253
254
254
- [all:vars]
255
- env=dev
256
-
257
255
[webservers]
258
256
webserver1.example.com
259
257
webserver2.example.com
@@ -281,8 +279,6 @@ A few notes here:
281
279
section of the inventory file.
282
280
- The ` webservers.yml ` playbook will only provision servers in the
283
281
` [webservers] ` section of the inventory file.
284
- - An inventory var called ` env ` is also set which applies to ` all ` hosts in the
285
- inventory. This is used in the playbook to determine which ` env_var ` file to use.
286
282
- The ` -K ` flag is for adding the sudo password you created for a new sudoer in
287
283
the Security role (if applicable)
288
284
0 commit comments