mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Refine @jvonau\'s \'Move NGINX shims to roles\'
This commit is contained in:
parent
ef93b30370
commit
fff83cd5fb
22 changed files with 223 additions and 271 deletions
|
@ -52,11 +52,11 @@
|
|||
recurse: yes
|
||||
state: directory
|
||||
|
||||
- name: Create dir {{ content_base }}/dbdata/moodle owned by {{ apache_user }} with write permission 0755
|
||||
- name: Create dir {{ content_base }}/dbdata/moodle owned by {{ apache_user }}
|
||||
file:
|
||||
path: "{{ content_base }}/dbdata/moodle"
|
||||
owner: "{{ apache_user }}"
|
||||
mode: 0755
|
||||
# mode: '0755'
|
||||
state: directory
|
||||
|
||||
- name: Create dir {{ moodle_data }} owned by {{ apache_user }}:{{ apache_user }} with write permission 0770 # /library/moodle
|
||||
|
@ -64,7 +64,7 @@
|
|||
path: "{{ moodle_data }}"
|
||||
owner: "{{ apache_user }}"
|
||||
group: "{{ apache_user }}"
|
||||
mode: 0770
|
||||
mode: '0770'
|
||||
state: directory
|
||||
|
||||
- name: Remove Apache's stock moodle.conf
|
||||
|
@ -76,9 +76,9 @@
|
|||
template:
|
||||
src: 022-moodle.j2
|
||||
dest: "/etc/{{ apache_config_dir }}/022-moodle.conf"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: '0644'
|
||||
|
||||
- name: Restart postgresql-iiab
|
||||
service:
|
||||
|
@ -109,7 +109,7 @@
|
|||
template:
|
||||
src: moodle_installer
|
||||
dest: "{{ moodle_base }}"
|
||||
mode: 0755
|
||||
mode: '0755'
|
||||
|
||||
- name: Enable & Restart postgresql-iiab
|
||||
service:
|
||||
|
@ -118,7 +118,7 @@
|
|||
enabled: yes
|
||||
when: moodle_enabled | bool
|
||||
|
||||
- name: Restart Apache service ({{ apache_service }})
|
||||
- name: Restart Apache systemd service ({{ apache_service }})
|
||||
service:
|
||||
name: "{{ apache_service }}"
|
||||
state: restarted
|
||||
|
@ -136,11 +136,10 @@
|
|||
#command: chown -R {{ apache_user }} {{ moodle_base }}
|
||||
file:
|
||||
path: "{{ moodle_base }}/config.php"
|
||||
mode: 0644
|
||||
mode: '0644'
|
||||
|
||||
- name: "Add 'moodle_installed: True' to {{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
|
||||
lineinfile:
|
||||
dest: "{{ iiab_state_file }}"
|
||||
regexp: '^moodle_installed'
|
||||
line: 'moodle_installed: True'
|
||||
state: present
|
||||
|
|
|
@ -4,10 +4,10 @@ location /moodle {
|
|||
proxy_set_header Host $host;
|
||||
proxy_pass http://127.0.0.1:{{ apache_port }};
|
||||
}
|
||||
|
||||
location ~ ^/moodle.*\.php$ {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://127.0.0.1:{{ apache_port }};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue