|
14
|
1 |
# vendor/bin/wp option delete _site_transient_update_themes |
|
|
2 |
# vendor/bin/wp option delete _site_transient_theme_roots |
|
|
3 |
|
|
|
4 |
- hosts: remote |
|
|
5 |
vars: |
|
|
6 |
src_dir: "{{playbook_dir}}/build/tmp/rc/src/" |
|
|
7 |
tasks: |
|
|
8 |
|
|
|
9 |
- name: create temporary file |
|
|
10 |
tempfile: |
|
|
11 |
state: file |
|
|
12 |
suffix: sql |
|
|
13 |
register: sql_tmp_path |
|
|
14 |
|
|
|
15 |
- name: transfer sql file |
|
|
16 |
copy: |
|
|
17 |
src: "{{db_file_path}}" |
|
|
18 |
dest: "{{sql_tmp_path.path}}" |
|
|
19 |
|
|
|
20 |
- name: load database |
|
|
21 |
command: |
|
|
22 |
argv: |
|
|
23 |
- "{{remote_path}}/vendor/bin/wp" |
|
|
24 |
- db |
|
|
25 |
- import |
|
|
26 |
- "{{sql_tmp_path.path}}" |
|
|
27 |
args: |
|
|
28 |
chdir: "{{remote_path}}" |
|
|
29 |
|
|
|
30 |
- name: delete temporary file |
|
|
31 |
file: |
|
|
32 |
path: "{{sql_tmp_path.path}}" |
|
|
33 |
state: absent |
|
|
34 |
|
|
|
35 |
- name: search and replace url |
|
|
36 |
command: |
|
|
37 |
argv: |
|
|
38 |
- "{{remote_path}}/vendor/bin/wp" |
|
|
39 |
- search-replace |
|
|
40 |
- "{{origin_url}}" |
|
|
41 |
- "{{rc_wp_home}}" |
|
|
42 |
args: |
|
|
43 |
chdir: "{{remote_path}}" |
|
|
44 |
|
|
|
45 |
- name: set template_root |
|
|
46 |
command: |
|
|
47 |
argv: |
|
|
48 |
- "{{remote_path}}/vendor/bin/wp" |
|
|
49 |
- option |
|
|
50 |
- set |
|
|
51 |
- template_root |
|
|
52 |
- "{{remote_path}}/web/wp/wp-content/themes" |
|
|
53 |
args: |
|
|
54 |
chdir: "{{remote_path}}" |
|
|
55 |
|
|
|
56 |
- name: delete _site_transient_update_themes option |
|
|
57 |
command: |
|
|
58 |
argv: |
|
|
59 |
- "{{remote_path}}/vendor/bin/wp" |
|
|
60 |
- option |
|
|
61 |
- delete |
|
|
62 |
- _site_transient_update_themes |
|
|
63 |
args: |
|
|
64 |
chdir: "{{remote_path}}" |
|
|
65 |
|
|
|
66 |
- name: delete _site_transient_theme_roots option |
|
|
67 |
command: |
|
|
68 |
argv: |
|
|
69 |
- "{{remote_path}}/vendor/bin/wp" |
|
|
70 |
- option |
|
|
71 |
- delete |
|
|
72 |
- _site_transient_theme_roots |
|
|
73 |
args: |
|
|
74 |
chdir: "{{remote_path}}" |
|
|
75 |
|
|
|
76 |
- name: update admin password |
|
|
77 |
command: |
|
|
78 |
argv: |
|
|
79 |
- "{{remote_path}}/vendor/bin/wp" |
|
|
80 |
- user |
|
|
81 |
- update |
|
|
82 |
- "{{rc_admin_user_id}}" |
|
|
83 |
- "--user_pass={{rc_admin_user_pswd}}" |
|
|
84 |
- --skip-email |
|
|
85 |
args: |
|
|
86 |
chdir: "{{remote_path}}" |
|
|
87 |
|
|
|
88 |
- name: flush cache |
|
|
89 |
command: |
|
|
90 |
argv: |
|
|
91 |
- "{{remote_path}}/vendor/bin/wp" |
|
|
92 |
- cache |
|
|
93 |
- flush |
|
|
94 |
args: |
|
|
95 |
chdir: "{{remote_path}}" |
|
|
96 |
|