Skip to content

Commit a330ca4

Browse files
committed
added wp-cli
1 parent 1a9e45b commit a330ca4

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

states/wordpress/cli.sls

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
3+
{{ sls }} home:
4+
file.directory:
5+
- name: /opt/wp-cli
6+
- mode: '0555'
7+
8+
9+
{{ sls }} home/bin:
10+
file.directory:
11+
- name: /opt/wp-cli/bin
12+
- mode: '0555'
13+
- require:
14+
- file: {{ sls }} home
15+
16+
17+
{% set domain = "https://raw.githubusercontent.com" -%}
18+
{{ sls }} install wp-cli:
19+
file.managed:
20+
- name: /opt/wp-cli/bin/wp-cli.phar
21+
- source: {{ domain }}/wp-cli/builds/gh-pages/phar/wp-cli.phar
22+
- source_hash: {{ domain }}/wp-cli/builds/gh-pages/phar/wp-cli.phar.sha512
23+
- mode: '0555'
24+
- require:
25+
- file: {{ sls }} home/bin
26+
27+
28+
{{ sls }} add wp-cli to local path:
29+
file.symlink:
30+
- name: /usr/local/bin/wp
31+
- target: /opt/wp-cli/bin/wp-cli.phar
32+
- require:
33+
- file: {{ sls }} install wp-cli

states/wordpress/init.sls

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ include:
66
- php.ng.cli
77
- php.ng.mysqlnd
88
- php_cc.composer
9+
- wordpress.cli

0 commit comments

Comments
 (0)