Commit 2655ae66 by John Eskew Committed by Feanil Patel

More fixes from code review.

parent 748b0936
......@@ -163,21 +163,21 @@
- name: restart the application
supervisorctl:
state: restarted
supervisorctl_path: "{{ '{{' }} supervisor_ctl }}"
config: "{{ '{{' }} supervisor_cfg }}"
supervisorctl_path: "{{ supervisor_ctl }}"
config: "{{ supervisor_cfg }}"
name: "{{ '{{' }} {{ role_name }}_service_name }}"
when: not disable_edx_services
sudo_user: "{{ '{{' }} supervisor_service_user }}"
sudo_user: "{{ supervisor_service_user }}"
tags:
- manage
- manage:start
- name: Copying nginx configs for {{ role_name }}
template:
src: edx/app/nginx/sites-available/{{ role_name }}.j2
dest: "{{ '{{' }} nginx_sites_available_dir }}/{{ role_name }}"
src: "edx/app/nginx/sites-available/{{ role_name }}.j2"
dest: "{{ nginx_sites_available_dir }}/{{ role_name }}"
owner: root
group: "{{ '{{' }} common_web_user }}"
group: "{{ common_web_user }}"
mode: 0640
notify: reload nginx
tags:
......@@ -186,8 +186,8 @@
- name: Creating nginx config links for {{ role_name }}
file:
src: "{{ '{{' }} nginx_sites_available_dir }}/{{ role_name }}"
dest: "{{ '{{' }} nginx_sites_enabled_dir }}/{{ role_name }}"
src: "{{ nginx_sites_available_dir }}/{{ role_name }}"
dest: "{{ nginx_sites_enabled_dir }}/{{ role_name }}"
state: link
owner: root
group: root
......
......@@ -198,7 +198,8 @@
template:
src: edx/app/nginx/sites-available/credentials.j2
dest: "{{ nginx_sites_available_dir }}/credentials"
owner: root group={{ common_web_user }}"
owner: root
group: "{{ common_web_user }}"
mode: 0640
notify: reload nginx
tags:
......
......@@ -6,10 +6,9 @@
with_items: GITRELOAD_REPOS
- 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
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 }}"
with_items: GITRELOAD_REPOS
......
......@@ -72,7 +72,7 @@
- install:app-requirements
- 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:
chdir: "{{ insights_code_dir }}"
become_user: "{{ insights_user }}"
......@@ -117,7 +117,9 @@
template:
src: "edx/app/insights/insights.sh.j2"
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:
- install
- install:configuration
......
......@@ -46,7 +46,7 @@
state: "directory"
owner: "{{ jenkins_user }}"
group: "{{ jenkins_group }}"
mode: "755"
mode: 0755
- name: configure s3 plugin
template:
......@@ -54,7 +54,7 @@
dest: "{{ jenkins_home }}/hudson.plugins.s3.S3BucketPublisher.xml"
owner: "{{ jenkins_user }}"
group: "{{ jenkins_group }}"
mode: "0644"
mode: 0644
- name: configure the boto profiles for jenkins
template:
......@@ -62,7 +62,7 @@
dest: "{{ jenkins_home }}/.boto"
owner: "{{ jenkins_user }}"
group: "{{ jenkins_group }}"
mode: "0600"
mode: 0600
tags:
- aws-config
......@@ -72,7 +72,7 @@
state: "directory"
owner: "{{ jenkins_user }}"
group: "{{ jenkins_group }}"
mode: "700"
mode: 0700
tags:
- aws-config
......@@ -82,7 +82,7 @@
dest: "{{ jenkins_home }}/.aws/config"
owner: "{{ jenkins_user }}"
group: "{{ jenkins_group }}"
mode: "0600"
mode: 0600
tags:
- aws-config
......@@ -132,7 +132,7 @@
- name: install system packages for edxapp virtualenvs
apt:
pkg: "{{','.join(jenkins_admin_debian_pkgs)}}"
pkg: "{{ ','.join(jenkins_admin_debian_pkgs) }}"
state: "present"
update_cache: yes
......@@ -169,7 +169,7 @@
get_url:
url: "{{ s3_one_time_url.url }}"
dest: "/tmp/{{ JENKINS_ADMIN_BACKUP_S3_KEY | basename }}"
mode: "0644"
mode: 0644
owner: "{{ jenkins_user }}"
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