@@ -18,7 +18,7 @@ production Django deployments:
1818- RabbitMQ
1919
2020Default 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.
2222
2323A ` certbot ` role is also included for automatically generating and renewing
2424trusted SSL certificates with [ Let's Encrypt] [ lets-encrypt ] .
@@ -58,7 +58,7 @@ sudo apt-get update
5858
5959### Configuring your application
6060
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`
6262file, where you can configure the location of your Git project, the project
6363name, and the application name which will be used throughout the Ansible
6464configuration.
@@ -230,8 +230,9 @@ The security module performs several basic server hardening tasks. Inspired by
230230** Security role configuration**
231231
232232- 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`
234234- Change variables in ` ./roles/security/vars/ ` per your desired configuration
235+ by overriding them in ` group_vars/[environment_name]/vars.yml `
235236
236237** Running the Security role**
237238
@@ -251,9 +252,6 @@ Create an inventory file for the environment, for example:
251252```
252253# development
253254
254- [all:vars]
255- env=dev
256-
257255[webservers]
258256webserver1.example.com
259257webserver2.example.com
@@ -281,8 +279,6 @@ A few notes here:
281279 section of the inventory file.
282280- The ` webservers.yml ` playbook will only provision servers in the
283281 ` [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.
286282- The ` -K ` flag is for adding the sudo password you created for a new sudoer in
287283 the Security role (if applicable)
288284
0 commit comments