mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 19:52:06 +00:00
43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
- name: Create symlink wordpress.conf from sites-enabled to sites-available, if wordpress_enabled (debuntu)
|
|
file:
|
|
src: /etc/apache2/sites-available/wordpress.conf
|
|
path: /etc/apache2/sites-enabled/wordpress.conf
|
|
state: link
|
|
when: wordpress_enabled and is_debuntu
|
|
|
|
- name: Remove /etc/apache2/sites-enabled/wordpress.conf if not wordpress_enabled (debuntu)
|
|
file:
|
|
path: /etc/apache2/sites-enabled/wordpress.conf
|
|
state: absent
|
|
when: not wordpress_enabled and is_debuntu
|
|
|
|
- name: Restart Apache service ({{ apache_service }}) to enable/disable http://box{{ wp_url }}
|
|
systemd:
|
|
name: "{{ apache_service }}"
|
|
state: restarted
|
|
|
|
- name: Add 'wordpress' variable values to {{ iiab_ini_file }}
|
|
ini_file:
|
|
path: "{{ iiab_ini_file }}"
|
|
section: wordpress
|
|
option: "{{ item.option }}"
|
|
value: "{{ item.value }}"
|
|
with_items:
|
|
- option: name
|
|
value: WordPress
|
|
- option: description
|
|
value: '"WordPress is a blog and web site management application."'
|
|
- option: wordpress_src
|
|
value: "{{ wordpress_src }}"
|
|
- option: wp_abs_path
|
|
value: "{{ wp_abs_path }}"
|
|
- option: wp_db_name
|
|
value: "{{ wp_db_name }}"
|
|
- option: wp_db_user
|
|
value: "{{ wp_db_user }}"
|
|
- option: wp_url
|
|
value: "{{ wp_url }}"
|
|
- option: wp_full_url
|
|
value: "{{ wp_full_url }}"
|
|
- option: wordpress_enabled
|
|
value: "{{ wordpress_enabled }}"
|