Skip to content

Commit

Permalink
Merge pull request #8 from kalxas/settings_patch
Browse files Browse the repository at this point in the history
Patching ALLOWED_HOSTS in settings.py
  • Loading branch information
jj0hns0n authored Jan 4, 2017
2 parents 1d1cedb + 4ee5603 commit ab17551
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tasks/geonode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
- name: copy the local_settings.py file in place
template: src=local_settings.py.j2 dest={{app_code_dir}}/{{app_name}}/{{app_name}}/local_settings.py

- name: patch the settings.py file in place
shell: sed -i -e "s/ALLOWED_HOSTS = os.getenv('ALLOWED_HOSTS', \['localhost', \])/ALLOWED_HOSTS = os.getenv('ALLOWED_HOSTS', \['localhost', '{{ server_name }}'\])/g" {{app_code_dir}}/{{app_name}}/{{app_name}}/settings.py
when: github_user != "GeoNode"

- name: check if requirements file exists
stat: path={{app_code_dir}}/{{app_name}}/requirements.txt
register: requirements_file
Expand Down

0 comments on commit ab17551

Please sign in to comment.