mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-04-28 18:30:24 +02:00
31 lines
1.0 KiB
YAML
31 lines
1.0 KiB
YAML
---
|
|
- name: "Include docker-discourse"
|
|
include_role:
|
|
name: docker-discourse
|
|
|
|
- name: "Generate Discourse API Key when WP Discourse is enabled"
|
|
include_tasks: generate-api-key.yml
|
|
|
|
# Load after api key generation, so that it can be used
|
|
- name: "Include WP Discourse vars"
|
|
include_vars:
|
|
file: "{{ role_path }}/vars/discourse.yml"
|
|
name: discourse_settings
|
|
|
|
- name: "Install WP Discourse plugin"
|
|
command: >
|
|
docker-compose exec -u www-data -T application
|
|
wp plugin install wp-discourse --activate
|
|
--path={{ wordpress_docker_html_path }}
|
|
args:
|
|
chdir: "{{ docker_compose.directories.instance }}"
|
|
|
|
- name: "Configure WP Discourse settings"
|
|
vars:
|
|
discourse_settings_json_b64: "{{ discourse_settings | to_json | b64encode }}"
|
|
command: >
|
|
docker-compose exec -u www-data -T application bash -lc
|
|
"wp eval \"update_option('wp_discourse_options', json_decode(base64_decode('{{ discourse_settings_json_b64 }}'), true));\" --path={{ wordpress_docker_html_path }}"
|
|
args:
|
|
chdir: "{{ docker_compose.directories.instance }}"
|