Skip to content

Commit

Permalink
Renamed Directory
Browse files Browse the repository at this point in the history
  • Loading branch information
heman4t committed Apr 26, 2022
1 parent 5b43bc2 commit 043650e
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/portal.stage.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# defaults file for portal.stage
# defaults file for stage_portal
documents_root: /var/www
key_path: /root/.ssh

Expand Down
51 changes: 3 additions & 48 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,52 +92,7 @@
become: yes
become_user: sammy

- name: Ensure {{ documents_root }}/{{ current_root }} directory has correct permissions.
file:
path: "{{ documents_root }}/{{ current_root }}"
state: directory
owner: sammy
group: www-data
mode: u=rw,g=r,o=r
tags: ['permission']

- name: Set {{ documents_root }}/{{ current_root }}/* files permission.
file:
path: "{{ documents_root }}/{{ current_root }}"
owner: sammy
group: www-data
mode: u=rw,g=r,o=r
recurse: yes
tags: ['permission']

- name: Set {{ documents_root }}/{{ current_root }}/* directories permission.
file:
path: "{{ documents_root }}/{{ current_root }}"
state: directory
owner: sammy
group: www-data
mode: u=rw,g=rX,o=r
recurse: yes
tags: ['permission']

- name: Set Project Directory permission.
file:
path: "{{ documents_root }}/{{ current_root }}/{{ item }}"
state: directory
owner: www-data
group: www-data
mode: u=rwX,g=rX,o=r
recurse: yes
loop: ['storage']
tags: ['permission']

- name: Set Project Directory permission.
file:
path: "{{ documents_root }}/{{ current_root }}/{{ item }}"
state: directory
owner: www-data
group: www-data
mode: u=rw,g=r,o=r
recurse: yes
loop: ['public/images','public/document']
tags: ['permission']
- name: project permissions
import_tasks: project_permissions.yml
tags: [ 'permission' ]
50 changes: 50 additions & 0 deletions tasks/project_permissions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

- name: Ensure {{ documents_root }}/{{ current_root }} directory has correct permissions.
file:
path: "{{ documents_root }}/{{ current_root }}"
state: directory
owner: sammy
group: www-data
mode: u=rw,g=r,o=r
tags: ['permission']

- name: Set {{ documents_root }}/{{ current_root }}/* files permission.
file:
path: "{{ documents_root }}/{{ current_root }}"
owner: sammy
group: www-data
mode: u=rw,g=r,o=r
recurse: yes
tags: ['permission']

- name: Set {{ documents_root }}/{{ current_root }}/* directories permission.
file:
path: "{{ documents_root }}/{{ current_root }}"
state: directory
owner: sammy
group: www-data
mode: u=rw,g=rX,o=r
recurse: yes
tags: ['permission']

- name: Set Project Directory permission.
file:
path: "{{ documents_root }}/{{ current_root }}/{{ item }}"
state: directory
owner: www-data
group: www-data
mode: u=rwX,g=rX,o=r
recurse: yes
loop: ['storage']
tags: ['permission']

- name: Set Project Directory permission.
file:
path: "{{ documents_root }}/{{ current_root }}/{{ item }}"
state: directory
owner: www-data
group: www-data
mode: u=rw,g=r,o=r
recurse: yes
loop: ['public/images','public/document']
tags: ['permission']
2 changes: 1 addition & 1 deletion tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
- hosts: localhost
remote_user: root
roles:
- portal.stage
- stage_portal
2 changes: 1 addition & 1 deletion vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
# vars file for portal.stage
# vars file for stage_portal

0 comments on commit 043650e

Please sign in to comment.