Rename variables to allow for additional ones

master
Dylan DiGeronimo 2020-04-07 15:25:16 -04:00
parent 3eb5eebd81
commit 48d40a58b2
2 changed files with 13 additions and 13 deletions

View File

@ -1,7 +1,7 @@
---
# Variables for production server
# Variables for frontend production server
project_path: "~/cce-search-prototype"
user_name: "ubuntu"
git_repo: "https://github.com/EbookFoundation/cce-search-prototype"
git_branch: "master"
frontend_project_path: "~/cce-search-prototype"
frontend_user_name: "ubuntu"
frontend_git_repo: "https://github.com/EbookFoundation/cce-search-prototype"
frontend_git_branch: "master"

View File

@ -31,25 +31,25 @@
- name: Create project directory
become: true
file:
path: "{{ project_path }}"
path: "{{ frontend_project_path }}"
state: directory
owner: "{{ user_name }}"
owner: "{{ frontend_user_name }}"
mode: 0755
- name: Checkout repo
git:
accept_hostkey: yes
force: yes
repo: "{{ git_repo }}"
dest: "{{ project_path }}"
version: "{{ git_branch }}"
repo: "{{ frontend_git_repo }}"
dest: "{{ frontend_project_path }}"
version: "{{ frontend_git_branch }}"
# Source: https://github.com/pypa/pipenv/issues/363#issuecomment-421310544
- name: Check for venv
ignore_errors: true
command: "pipenv --venv"
args:
chdir: "{{ project_path }}"
chdir: "{{ frontend_project_path }}"
register: pipenv_venv_check_cmd
changed_when:
- ('No virtualenv' not in pipenv_venv_check_cmd.stderr)
@ -98,8 +98,8 @@
copy:
src: cce-search.conf
dest: /etc/nginx/conf.d/cce-search,conf
owner: "{{ user_name }}"
group: "{{ user_name }}"
owner: "{{ frontend_user_name }}"
group: "{{ frontend_user_name }}"
mode: 0755
# Both start Nginx and enable it to restart on reboot