Commit 2655ae66 by John Eskew Committed by Feanil Patel

More fixes from code review.

parent 748b0936
...@@ -163,21 +163,21 @@ ...@@ -163,21 +163,21 @@
- name: restart the application - name: restart the application
supervisorctl: supervisorctl:
state: restarted state: restarted
supervisorctl_path: "{{ '{{' }} supervisor_ctl }}" supervisorctl_path: "{{ supervisor_ctl }}"
config: "{{ '{{' }} supervisor_cfg }}" config: "{{ supervisor_cfg }}"
name: "{{ '{{' }} {{ role_name }}_service_name }}" name: "{{ '{{' }} {{ role_name }}_service_name }}"
when: not disable_edx_services when: not disable_edx_services
sudo_user: "{{ '{{' }} supervisor_service_user }}" sudo_user: "{{ supervisor_service_user }}"
tags: tags:
- manage - manage
- manage:start - manage:start
- name: Copying nginx configs for {{ role_name }} - name: Copying nginx configs for {{ role_name }}
template: template:
src: edx/app/nginx/sites-available/{{ role_name }}.j2 src: "edx/app/nginx/sites-available/{{ role_name }}.j2"
dest: "{{ '{{' }} nginx_sites_available_dir }}/{{ role_name }}" dest: "{{ nginx_sites_available_dir }}/{{ role_name }}"
owner: root owner: root
group: "{{ '{{' }} common_web_user }}" group: "{{ common_web_user }}"
mode: 0640 mode: 0640
notify: reload nginx notify: reload nginx
tags: tags:
...@@ -186,8 +186,8 @@ ...@@ -186,8 +186,8 @@
- name: Creating nginx config links for {{ role_name }} - name: Creating nginx config links for {{ role_name }}
file: file:
src: "{{ '{{' }} nginx_sites_available_dir }}/{{ role_name }}" src: "{{ nginx_sites_available_dir }}/{{ role_name }}"
dest: "{{ '{{' }} nginx_sites_enabled_dir }}/{{ role_name }}" dest: "{{ nginx_sites_enabled_dir }}/{{ role_name }}"
state: link state: link
owner: root owner: root
group: root group: root
......
...@@ -198,7 +198,8 @@ ...@@ -198,7 +198,8 @@
template: template:
src: edx/app/nginx/sites-available/credentials.j2 src: edx/app/nginx/sites-available/credentials.j2
dest: "{{ nginx_sites_available_dir }}/credentials" dest: "{{ nginx_sites_available_dir }}/credentials"
owner: root group={{ common_web_user }}" owner: root
group: "{{ common_web_user }}"
mode: 0640 mode: 0640
notify: reload nginx notify: reload nginx
tags: tags:
......
...@@ -6,10 +6,9 @@ ...@@ -6,10 +6,9 @@
with_items: GITRELOAD_REPOS with_items: GITRELOAD_REPOS
- name: do import of courses - name: do import of courses
shell: shell: "SERVICE_VARIANT=lms {{ edxapp_venv_bin }}/python manage.py lms --settings=aws git_add_course {{ item.url }} {{ GITRELOAD_REPODIR }}/{{ item.name }}"
executable: /bin/bash executable: /bin/bash
chdir: "{{ edxapp_code_dir }}" chdir: "{{ edxapp_code_dir }}"
SERVICE_VARIANT: "lms {{ edxapp_venv_bin }}/python manage.py lms --settings=aws git_add_course {{ item.url }} {{ GITRELOAD_REPODIR }}/{{ item.name }}"
become_user: "{{ common_web_user }}" become_user: "{{ common_web_user }}"
with_items: GITRELOAD_REPOS with_items: GITRELOAD_REPOS
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
- install:app-requirements - install:app-requirements
- name: migrate - name: migrate
shell: "DB_MIGRATION_USER='{{ COMMON_MYSQL_MIGRATE_USER }}'DB_MIGRATION_PASS='{{ COMMON_MYSQL_MIGRATE_PASS }}' {{ insights_venv_dir }}/bin/python {{ insights_manage }} migrate --noinput" shell: "DB_MIGRATION_USER='{{ COMMON_MYSQL_MIGRATE_USER }}' DB_MIGRATION_PASS='{{ COMMON_MYSQL_MIGRATE_PASS }}' {{ insights_venv_dir }}/bin/python {{ insights_manage }} migrate --noinput"
args: args:
chdir: "{{ insights_code_dir }}" chdir: "{{ insights_code_dir }}"
become_user: "{{ insights_user }}" become_user: "{{ insights_user }}"
...@@ -117,7 +117,9 @@ ...@@ -117,7 +117,9 @@
template: template:
src: "edx/app/insights/insights.sh.j2" src: "edx/app/insights/insights.sh.j2"
dest: "{{ insights_app_dir }}/{{ insights_service_name }}.sh" dest: "{{ insights_app_dir }}/{{ insights_service_name }}.sh"
mode: "0650 owner={{ supervisor_user }} group={{ common_web_user }}" mode: 0650
owner: "{{ supervisor_user }}"
group: "{{ common_web_user }}"
tags: tags:
- install - install
- install:configuration - install:configuration
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
state: "directory" state: "directory"
owner: "{{ jenkins_user }}" owner: "{{ jenkins_user }}"
group: "{{ jenkins_group }}" group: "{{ jenkins_group }}"
mode: "755" mode: 0755
- name: configure s3 plugin - name: configure s3 plugin
template: template:
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
dest: "{{ jenkins_home }}/hudson.plugins.s3.S3BucketPublisher.xml" dest: "{{ jenkins_home }}/hudson.plugins.s3.S3BucketPublisher.xml"
owner: "{{ jenkins_user }}" owner: "{{ jenkins_user }}"
group: "{{ jenkins_group }}" group: "{{ jenkins_group }}"
mode: "0644" mode: 0644
- name: configure the boto profiles for jenkins - name: configure the boto profiles for jenkins
template: template:
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
dest: "{{ jenkins_home }}/.boto" dest: "{{ jenkins_home }}/.boto"
owner: "{{ jenkins_user }}" owner: "{{ jenkins_user }}"
group: "{{ jenkins_group }}" group: "{{ jenkins_group }}"
mode: "0600" mode: 0600
tags: tags:
- aws-config - aws-config
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
state: "directory" state: "directory"
owner: "{{ jenkins_user }}" owner: "{{ jenkins_user }}"
group: "{{ jenkins_group }}" group: "{{ jenkins_group }}"
mode: "700" mode: 0700
tags: tags:
- aws-config - aws-config
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
dest: "{{ jenkins_home }}/.aws/config" dest: "{{ jenkins_home }}/.aws/config"
owner: "{{ jenkins_user }}" owner: "{{ jenkins_user }}"
group: "{{ jenkins_group }}" group: "{{ jenkins_group }}"
mode: "0600" mode: 0600
tags: tags:
- aws-config - aws-config
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
- name: install system packages for edxapp virtualenvs - name: install system packages for edxapp virtualenvs
apt: apt:
pkg: "{{','.join(jenkins_admin_debian_pkgs)}}" pkg: "{{ ','.join(jenkins_admin_debian_pkgs) }}"
state: "present" state: "present"
update_cache: yes update_cache: yes
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
get_url: get_url:
url: "{{ s3_one_time_url.url }}" url: "{{ s3_one_time_url.url }}"
dest: "/tmp/{{ JENKINS_ADMIN_BACKUP_S3_KEY | basename }}" dest: "/tmp/{{ JENKINS_ADMIN_BACKUP_S3_KEY | basename }}"
mode: "0644" mode: 0644
owner: "{{ jenkins_user }}" owner: "{{ jenkins_user }}"
when: JENKINS_ADMIN_BACKUP_BUCKET is defined and JENKINS_ADMIN_BACKUP_S3_KEY is defined when: JENKINS_ADMIN_BACKUP_BUCKET is defined and JENKINS_ADMIN_BACKUP_S3_KEY is defined
......
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