Commit 63e66986 by Feanil Patel

Ensure the xqueue user and home directories exist.

parent ff71848b
...@@ -57,6 +57,7 @@ xqueue_auth_config: ...@@ -57,6 +57,7 @@ xqueue_auth_config:
'REQUESTS_BASIC_AUTH': $XQUEUE_BASIC_AUTH 'REQUESTS_BASIC_AUTH': $XQUEUE_BASIC_AUTH
'USERS': { '{{XQUEUE_DJANGO_USER}}' : $XQUEUE_DJANGO_PASSWORD } 'USERS': { '{{XQUEUE_DJANGO_USER}}' : $XQUEUE_DJANGO_PASSWORD }
'DATABASES': 'DATABASES':
default:
'NAME': $XQUEUE_MYSQL_DB_NAME 'NAME': $XQUEUE_MYSQL_DB_NAME
'USER': $XQUEUE_MYSQL_USER 'USER': $XQUEUE_MYSQL_USER
'PASSWORD': $XQUEUE_MYSQL_PASSWORD 'PASSWORD': $XQUEUE_MYSQL_PASSWORD
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
- deploy - deploy
# Do A Checkout # Do A Checkout
- name: xqueue | git checkout xqueue repo into $app_base_dir - name: xqueue | git checkout xqueue repo into {{app_base_dir}}
git: dest={{xqueue_code_dir}} repo={{xqueue_source_repo}} version={{xqueue_version}} git: dest={{xqueue_code_dir}} repo={{xqueue_source_repo}} version={{xqueue_version}}
tags: tags:
- xqueue - xqueue
......
...@@ -17,6 +17,34 @@ ...@@ -17,6 +17,34 @@
tags: tags:
- xqueue - xqueue
- name: xqueue | create {{ xqueue_user_home }}
# workaround for the case where the parent
# directory doesn't exist
file: >
path={{ xqueue_user_home }}
state=directory
- name: xqueue | create xqueue user {{ xqueue_user }}
user: >
name={{ xqueue_user }}
state=present
shell=/bin/bash
home={{ xqueue_user_home }}
createhome=yes
tags:
- forum
- update
- name: xqueue | ensure homedir permissions {{ xqueue_user_home }}
# workaround for the case where the parent
# directory doesn't exist
file: >
path={{ xqueue_user_home }}
owner={{ xqueue_user }}
group={{ xqueue_user }}
state=directory
recurse=yes
- name: xqueue | create xqueue db - name: xqueue | create xqueue db
mysql_db: > mysql_db: >
name={{xqueue_auth_config.DATABASES.default.NAME}} name={{xqueue_auth_config.DATABASES.default.NAME}}
......
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