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
8f0f8d6ce5
commit
d9659bc7fd
1 changed files with 64 additions and 51 deletions
|
@ -15,6 +15,7 @@
|
||||||
get_url:
|
get_url:
|
||||||
url: "{{ wordpress_download_base_url }}/{{ wordpress_src }}"
|
url: "{{ wordpress_download_base_url }}/{{ wordpress_src }}"
|
||||||
dest: "{{ downloads_dir }}"
|
dest: "{{ downloads_dir }}"
|
||||||
|
timeout: "{{ download_timeout }}"
|
||||||
# force: yes
|
# force: yes
|
||||||
# backup: yes
|
# backup: yes
|
||||||
register: wp_download_output
|
register: wp_download_output
|
||||||
|
@ -61,66 +62,78 @@
|
||||||
command: "/usr/bin/find {{ wp_abs_path }} -type d -exec chmod 775 {} +"
|
command: "/usr/bin/find {{ wp_abs_path }} -type d -exec chmod 775 {} +"
|
||||||
|
|
||||||
- name: Copy wp salt values
|
- name: Copy wp salt values
|
||||||
copy: src=wp-keys.php.BAK
|
copy:
|
||||||
dest={{ wp_abs_path }}/wp-keys.php.BAK
|
src: wp-keys.php.BAK
|
||||||
owner=root
|
dest: "{{ wp_abs_path }}/wp-keys.php.BAK"
|
||||||
group={{ apache_user }}
|
owner: root
|
||||||
mode=0640
|
group: "{{ apache_user }}"
|
||||||
|
mode: 0640
|
||||||
|
|
||||||
# Fetch random salts for WordPress config into wp-keys.php file by generating script and running
|
# Fetch random salts for WordPress config into wp-keys.php file by generating script and running
|
||||||
|
|
||||||
- name: Create wp salt script
|
- name: Create wp salt script
|
||||||
template: src=get-iiab-wp-salts.j2
|
template:
|
||||||
dest=/tmp/get-iiab-wp-salts
|
src: get-iiab-wp-salts.j2
|
||||||
owner=root
|
dest: /tmp/get-iiab-wp-salts
|
||||||
group=root
|
owner: root
|
||||||
mode=0700
|
group: root
|
||||||
|
mode: 0700
|
||||||
|
|
||||||
- name: Run wp salt script to create /library/wordpress/wp-keys.php
|
- name: Run wp salt script to create /library/wordpress/wp-keys.php
|
||||||
command: /tmp/get-iiab-wp-salts
|
command: /tmp/get-iiab-wp-salts
|
||||||
|
|
||||||
- name: Cleanup - remove wp salt script
|
- name: Cleanup - remove wp salt script
|
||||||
file: path=/tmp/get-iiab-wp-salts
|
file:
|
||||||
state=absent
|
path: /tmp/get-iiab-wp-salts
|
||||||
|
state: absent
|
||||||
|
|
||||||
- name: MySQL database needs to be running if we are trying to create a new db
|
- name: MySQL database needs to be running if we are trying to create a new db
|
||||||
service: state=started
|
service:
|
||||||
name='{{ mysql_service }}'
|
state: started
|
||||||
|
name: "{{ mysql_service }}"
|
||||||
|
|
||||||
- name: Create MySQL wordpress database
|
- name: Create MySQL wordpress database
|
||||||
mysql_db: name={{ wp_db_name }}
|
mysql_db:
|
||||||
state=present
|
name: "{{ wp_db_name }}"
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Create MySQL wordpress database user
|
- name: Create MySQL wordpress database user
|
||||||
mysql_user: name={{ wp_db_user }}
|
mysql_user:
|
||||||
password={{ wp_db_user_password }}
|
name: "{{ wp_db_user }}"
|
||||||
priv={{ wp_db_name }}.*:ALL,GRANT
|
password: "{{ wp_db_user_password }}"
|
||||||
state=present
|
priv: "{{ wp_db_name }}.*:ALL,GRANT"
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Copy WordPress config file
|
- name: Copy WordPress config file
|
||||||
template: src=wp-config.php.j2
|
template:
|
||||||
dest={{ wp_abs_path }}/wp-config.php
|
src: wp-config.php.j2
|
||||||
owner=root
|
dest: "{{ wp_abs_path }}/wp-config.php"
|
||||||
group={{ apache_user }}
|
owner: root
|
||||||
mode=0660
|
group: "{{ apache_user }}"
|
||||||
|
mode: 0660
|
||||||
|
|
||||||
- name: Copy WordPress httpd conf file
|
- name: Copy WordPress httpd conf file
|
||||||
template: src=wordpress.conf.j2
|
template:
|
||||||
dest=/etc/{{ apache_config_dir }}/wordpress.conf
|
src: wordpress.conf.j2
|
||||||
|
dest: "/etc/{{ apache_config_dir }}/wordpress.conf"
|
||||||
|
|
||||||
- name: Enable httpd conf file if we are disabled (debuntu)
|
- name: Enable httpd conf file if we are disabled (debuntu)
|
||||||
file: path=/etc/apache2/sites-enabled/wordpress.conf
|
file:
|
||||||
src=/etc/apache2/sites-available/wordpress.conf
|
src: /etc/apache2/sites-available/wordpress.conf
|
||||||
state=link
|
dest: /etc/apache2/sites-enabled/wordpress.conf
|
||||||
|
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 httpd conf file if we are disabled (OS's other than debuntu)
|
||||||
file: path=/etc/apache2/sites-enabled/wordpress.conf
|
file:
|
||||||
state=absent
|
path: /etc/apache2/sites-enabled/wordpress.conf
|
||||||
|
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, so it picks up the new aliases
|
||||||
service: name={{ apache_service }} state=restarted
|
service:
|
||||||
|
name: "{{ apache_service }}"
|
||||||
|
state: restarted
|
||||||
|
|
||||||
- name: Add 'wordpress' to list of services at /etc/iiab/iiab.ini
|
- name: Add 'wordpress' to list of services at /etc/iiab/iiab.ini
|
||||||
ini_file:
|
ini_file:
|
||||||
|
@ -129,21 +142,21 @@
|
||||||
option: "{{ item.option }}"
|
option: "{{ item.option }}"
|
||||||
value: "{{ item.value }}"
|
value: "{{ item.value }}"
|
||||||
with_items:
|
with_items:
|
||||||
- option: name
|
- option: name
|
||||||
value: WordPress
|
value: WordPress
|
||||||
- option: description
|
- option: description
|
||||||
value: '"WordPress is a blog and web site management application."'
|
value: '"WordPress is a blog and web site management application."'
|
||||||
- option: wordpress_src
|
- option: wordpress_src
|
||||||
value: "{{ wordpress_src }}"
|
value: "{{ wordpress_src }}"
|
||||||
- option: wp_abs_path
|
- option: wp_abs_path
|
||||||
value: "{{ wp_abs_path }}"
|
value: "{{ wp_abs_path }}"
|
||||||
- option: wp_db_name
|
- option: wp_db_name
|
||||||
value: "{{ wp_db_name }}"
|
value: "{{ wp_db_name }}"
|
||||||
- option: wp_db_user
|
- option: wp_db_user
|
||||||
value: "{{ wp_db_user }}"
|
value: "{{ wp_db_user }}"
|
||||||
- option: wp_url
|
- option: wp_url
|
||||||
value: "{{ wp_url }}"
|
value: "{{ wp_url }}"
|
||||||
- option: wp_full_url
|
- option: wp_full_url
|
||||||
value: "{{ wp_full_url }}"
|
value: "{{ wp_full_url }}"
|
||||||
- option: wordpress_enabled
|
- option: wordpress_enabled
|
||||||
value: "{{ wordpress_enabled }}"
|
value: "{{ wordpress_enabled }}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue