-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathpressbooks.sls
39 lines (33 loc) · 1.27 KB
/
pressbooks.sls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Provides support for the Candela / Pressbooks, if they are installed
#
{% set DOCROOT = pillar.wordpress.docroot -%}
{% set GIT = "/var/www/git" -%}
{% set WP_CONTENT = "{}/wp-content".format(DOCROOT) -%}
{% set MU_PLUGINS = "{}/mu-plugins".format(WP_CONTENT) -%}
{% set PLUGINS = "{}/plugins".format(WP_CONTENT) -%}
{% set THEMES = "{}/themes".format(WP_CONTENT) -%}
{{ sls }} symlink wp-content/mu-plugins/hm-autoloader.php:
file.symlink:
- name: {{ MU_PLUGINS }}/hm-autoloader.php
- target: {{ PLUGINS }}/pressbooks/hm-autoloader.php
- require:
- file: wordpress dir wp-content/mu-plugins
- composer: wordpress composer update
- onlyif:
- test -f {{ PLUGINS }}/pressbooks/hm-autoloader.php
{{ sls }} symlink wp-content/themes/bombadil:
file.symlink:
- name: {{ THEMES }}/bombadil
- target: {{ GIT }}/candela-utility/themes/bombadil
- require:
- file: wordpress dir wp-content/themes
- onlyif:
- test -d {{ GIT }}/candela-utility/themes/bombadil
{{ sls }} symlink wp-content/themes/candela:
file.symlink:
- name: {{ THEMES }}/candela
- target: {{ GIT }}/candela-utility/themes/candela
- require:
- file: wordpress dir wp-content/themes
- onlyif:
- test -d {{ GIT }}/candela-utility/themes/candela