mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Update install.yml
This commit is contained in:
parent
5664b555e8
commit
b61a46944c
1 changed files with 22 additions and 7 deletions
|
@ -7,9 +7,9 @@
|
||||||
# - "mv /library/wordpress /library/wordpress.old"
|
# - "mv /library/wordpress /library/wordpress.old"
|
||||||
# - back up WordPress's database then drop it
|
# - back up WordPress's database then drop it
|
||||||
#
|
#
|
||||||
# REASON: "keep_newer: yes" below tries to preserves WordPress's self-upgrades
|
# REASON: "keep_newer: yes" below tries to preserve WordPress's self-upgrades
|
||||||
# and security enhancements using timestamps under /library/wordpress, as these
|
# and security enhancements using timestamps under /library/wordpress, as these
|
||||||
# can arise without warning when WordPress is online, since WordPress ~4.8.
|
# can arise without warning when WordPress is online, since WordPress ~4.8
|
||||||
|
|
||||||
- name: Download the latest WordPress software
|
- name: Download the latest WordPress software
|
||||||
get_url:
|
get_url:
|
||||||
|
@ -47,6 +47,21 @@
|
||||||
mode: 0664
|
mode: 0664
|
||||||
keep_newer: yes
|
keep_newer: yes
|
||||||
|
|
||||||
|
# For schools that use WordPress intensively. WARNING: Enabling this (might)
|
||||||
|
# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147
|
||||||
|
- name: Raise php.ini limits in schools that use WordPress intensively
|
||||||
|
lineinfile:
|
||||||
|
path: "/etc/php/{{ php_version }}/{{ apache_service }}/php.ini"
|
||||||
|
regexp: "{{ item.regexp }}"
|
||||||
|
line: "{{ item.line }}"
|
||||||
|
when: wordpress_raise_php_limits
|
||||||
|
with_items:
|
||||||
|
- { regexp: '^upload_max_filesize', line: 'upload_max_filesize 64M ; default on RPi is 2M' }
|
||||||
|
- { regexp: '^post_max_size', line: 'post_max_size 128M ; default on RPi is 8M' }
|
||||||
|
- { regexp: '^memory_limit', line: 'memory_limit 256M ; default on RPi is 128M' }
|
||||||
|
- { regexp: '^max_execution_time', line: 'max_execution_time 300 ; default on RPi is 30' }
|
||||||
|
- { regexp: '^max_input_time', line: 'max_input_time 300 ; default on RPi is 60' }
|
||||||
|
|
||||||
# - name: Rename /library/wordpress* to /library/wordpress
|
# - name: Rename /library/wordpress* to /library/wordpress
|
||||||
# shell: if [ ! -d {{ wp_abs_path }} ]; then mv {{ wp_abs_path }}* {{ wp_abs_path }}; fi
|
# shell: if [ ! -d {{ wp_abs_path }} ]; then mv {{ wp_abs_path }}* {{ wp_abs_path }}; fi
|
||||||
|
|
||||||
|
@ -104,7 +119,7 @@
|
||||||
priv: "{{ wp_db_name }}.*:ALL,GRANT"
|
priv: "{{ wp_db_name }}.*:ALL,GRANT"
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Copy WordPress config file
|
- name: Copy wp-config.php
|
||||||
template:
|
template:
|
||||||
src: wp-config.php.j2
|
src: wp-config.php.j2
|
||||||
dest: "{{ wp_abs_path }}/wp-config.php"
|
dest: "{{ wp_abs_path }}/wp-config.php"
|
||||||
|
@ -112,25 +127,25 @@
|
||||||
group: "{{ apache_user }}"
|
group: "{{ apache_user }}"
|
||||||
mode: 0660
|
mode: 0660
|
||||||
|
|
||||||
- name: Copy WordPress httpd conf file
|
- name: Copy wordpress.conf to permit http://box{{ wp_url }}
|
||||||
template:
|
template:
|
||||||
src: wordpress.conf.j2
|
src: wordpress.conf.j2
|
||||||
dest: "/etc/{{ apache_config_dir }}/wordpress.conf"
|
dest: "/etc/{{ apache_config_dir }}/wordpress.conf"
|
||||||
|
|
||||||
- name: Enable httpd conf file if we are disabled (debuntu)
|
- name: Enable wordpress.conf if wordpress_enabled (debuntu)
|
||||||
file:
|
file:
|
||||||
src: /etc/apache2/sites-available/wordpress.conf
|
src: /etc/apache2/sites-available/wordpress.conf
|
||||||
dest: /etc/apache2/sites-enabled/wordpress.conf
|
dest: /etc/apache2/sites-enabled/wordpress.conf
|
||||||
state: link
|
state: link
|
||||||
when: wordpress_enabled and is_debuntu
|
when: wordpress_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Remove httpd conf file if we are disabled (OS's other than debuntu)
|
- name: Remove wordpress.conf if not wordpress_enabled (debuntu)
|
||||||
file:
|
file:
|
||||||
path: /etc/apache2/sites-enabled/wordpress.conf
|
path: /etc/apache2/sites-enabled/wordpress.conf
|
||||||
state: absent
|
state: absent
|
||||||
when: not wordpress_enabled and is_debuntu
|
when: not wordpress_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Restart Apache, so it picks up the new aliases
|
- name: Restart Apache to enable/disable http://box{{ wp_url }}
|
||||||
service:
|
service:
|
||||||
name: "{{ apache_service }}"
|
name: "{{ apache_service }}"
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue