Commit 319ce53d authored by Okhin's avatar Okhin

Fixing the ownership of some directories

parent 1a61a90f
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- name: create a rp user - name: create a rp user
user: user:
append: yes append: yes
groups: [gitlab-runner, www-data] groups: [www-data]
home: "{{ rp_path }}" home: "{{ rp_path }}"
name: "{{ rp_unix_user }}" name: "{{ rp_unix_user }}"
state: present state: present
...@@ -38,23 +38,26 @@ ...@@ -38,23 +38,26 @@
path: /run/uwsgi/app/rp/ path: /run/uwsgi/app/rp/
owner: "{{ rp_unix_user }}" owner: "{{ rp_unix_user }}"
group: www-data group: www-data
mode: 0775 mode: g+srw
- block:
- name: create the directory for code and environment - name: create the directory for code
file: file:
path: "{{ rp_path }}" path: "{{ rp_source_path }}"
state: directory state: directory
group: gitlab-runner group: www-data
mode: g+srw
recurse: yes
- block:
- name: unzip the rp code - name: unzip the rp code
unarchive: unarchive:
src: "{{ rp_download_url }}" src: "{{ rp_download_url }}"
dest: "{{ rp_path }}" dest: "{{ rp_path }}"
keep_newer: yes keep_newer: yes
remote_src: yes remote_src: yes
mode: g+rw mode: g+srw
owner: "{{ rp_unix_user }}" owner: "{{ rp_unix_user }}"
group: gitlab-runner group: www-data
- name: install python requirement - name: install python requirement
pip: pip:
...@@ -69,6 +72,15 @@ ...@@ -69,6 +72,15 @@
virtualenv_python: python3 virtualenv_python: python3
when: rp_debug when: rp_debug
- name: setting proper permission for the virtualenv
file:
path: "{{ rp_path }}/env"
state: directory
follow: false
group: www-data
mode: g+srw
recurse: yes
- name: yarn install the application - name: yarn install the application
yarn: yarn:
path: "{{ rp_source_path }}/" path: "{{ rp_source_path }}/"
...@@ -86,6 +98,9 @@ ...@@ -86,6 +98,9 @@
template: template:
src: templates/env.py.j2 src: templates/env.py.j2
dest: "{{ rp_source_path }}/project/settings/env.py" dest: "{{ rp_source_path }}/project/settings/env.py"
owner: "{{ rp_unix_user }}"
group: www-data
mode: g+srw
- name: migrate the database - name: migrate the database
django_manage: django_manage:
...@@ -111,5 +126,3 @@ ...@@ -111,5 +126,3 @@
template: template:
src: templates/vassals-rp.j2 src: templates/vassals-rp.j2
dest: /etc/uwsgi-emperor/vassals/rp.ini dest: /etc/uwsgi-emperor/vassals/rp.ini
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