| author | Riwad Salim <riwad.salim@yahoo.fr> |
| Wed, 04 Sep 2019 16:59:11 +0200 | |
| changeset 35 | 7868b794e6cc |
| parent 20 | 36bdc6e0deb1 |
| permissions | -rw-r--r-- |
| 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 |
||
|
20
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
76 |
- name: Set site in french |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
77 |
command: |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
78 |
argv: |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
79 |
- "{{remote_path}}/vendor/bin/wp" |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
80 |
- site |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
81 |
- switch-language |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
82 |
- fr_FR |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
83 |
args: |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
84 |
chdir: "{{remote_path}}" |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
85 |
|
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
86 |
|
| 14 | 87 |
- name: update admin password |
88 |
command: |
|
89 |
argv: |
|
90 |
- "{{remote_path}}/vendor/bin/wp" |
|
91 |
- user |
|
92 |
- update |
|
93 |
- "{{rc_admin_user_id}}" |
|
94 |
- "--user_pass={{rc_admin_user_pswd}}" |
|
95 |
- --skip-email |
|
96 |
args: |
|
97 |
chdir: "{{remote_path}}" |
|
98 |
||
|
20
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
99 |
- name: update admin language |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
100 |
command: |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
101 |
argv: |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
102 |
- "{{remote_path}}/vendor/bin/wp" |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
103 |
- user |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
104 |
- update |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
105 |
- "{{rc_admin_user_id}}" |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
106 |
- "--locale=en_US" |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
107 |
- --skip-email |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
108 |
args: |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
109 |
chdir: "{{remote_path}}" |
|
36bdc6e0deb1
add language update for site and admin user in deploy_db
ymh <ymh.work@gmail.com>
parents:
14
diff
changeset
|
110 |
|
| 14 | 111 |
- name: flush cache |
112 |
command: |
|
113 |
argv: |
|
114 |
- "{{remote_path}}/vendor/bin/wp" |
|
115 |
- cache |
|
116 |
- flush |
|
117 |
args: |
|
118 |
chdir: "{{remote_path}}" |
|
119 |
|