Commit d060de9f by Sef Kloninger Committed by Jason Bau

make nginx.conf overriding optional

If the nginx play is called with the nginx_conf varialble, then expect
to find in {{secure_dir}}/files/nginx.conf and copy it over.  If not set
then the default one already there will be sufficient.
parent af2abc0c
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
- "{{ secure_dir }}/vars/edxapp_prod_users.yml" - "{{ secure_dir }}/vars/edxapp_prod_users.yml"
roles: roles:
- common - common
- nginx - {'role': 'nginx', 'nginx_conf': true}
- {'role': 'edxapp', 'openid_workaround': true, 'template_subdir': 'carnegie'} - {'role': 'edxapp', 'openid_workaround': true, 'template_subdir': 'carnegie'}
# run this role last # run this role last
# - in_production # - in_production
...@@ -8,7 +8,7 @@ hash_behaviour=merge ...@@ -8,7 +8,7 @@ hash_behaviour=merge
# These are environment-specific defaults # These are environment-specific defaults
forks=10 forks=10
#forks=1 #forks=1
log_path=stage-edx-ansible.log log_path=~/stage-edx-ansible.log
transport=ssh transport=ssh
hostfile=./ec2.py hostfile=./ec2.py
extra_vars='key=deployment name=edx-stage group=edx-stage region=us-west-1' extra_vars='key=deployment name=edx-stage group=edx-stage region=us-west-1'
...@@ -16,6 +16,5 @@ user=ubuntu ...@@ -16,6 +16,5 @@ user=ubuntu
[ssh_connection] [ssh_connection]
# example from https://github.com/ansible/ansible/blob/devel/examples/ansible.cfg # example from https://github.com/ansible/ansible/blob/devel/examples/ansible.cfg
#ssh_args=-o ControlMaster=auto -o ControlPersist=60s -o ControlPath=/tmp/ansible-ssh-%h-%p-%r
ssh_args=-F stage-ssh-config -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=/tmp/ansible-ssh-%h-%p-%r ssh_args=-F stage-ssh-config -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=/tmp/ansible-ssh-%h-%p-%r
scp_if_ssh=True scp_if_ssh=True
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
- name: nginx | Server configuration file - name: nginx | Server configuration file
copy: src={{secure_dir}}/files/nginx.conf dest=/etc/nginx/nginx.conf owner=root group=root mode=0644 copy: src={{secure_dir}}/files/nginx.conf dest=/etc/nginx/nginx.conf owner=root group=root mode=0644
when: nginx_conf is defined
notify: nginx | restart nginx notify: nginx | restart nginx
tags: tags:
- nginx - nginx
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment