|
1 | 1 | # tasks file |
2 | 2 | --- |
3 | 3 | - name: core | check download |
4 | | - command: > |
| 4 | + ansible.builtin.command: > |
5 | 5 | test -f {{ item.path }}/wp-load.php |
6 | 6 | register: _check_download |
7 | 7 | failed_when: false |
|
11 | 11 | - wordpress-core-is-downloaded |
12 | 12 |
|
13 | 13 | - name: core | download |
14 | | - command: > |
| 14 | + ansible.builtin.command: > |
15 | 15 | wp-cli core download |
16 | 16 | --allow-root --no-color --path='{{ item.item.path }}' |
17 | 17 | --locale='{{ item.item.locale | default('en_US') }}' |
| 18 | + changed_when: true |
18 | 19 | with_items: "{{ _check_download.results | default([]) }}" |
19 | 20 | when: item.rc != 0 |
20 | 21 | tags: |
21 | 22 | - wordpress-core-downloaded |
22 | 23 |
|
23 | 24 | - name: core | configure |
24 | | - command: > |
| 25 | + ansible.builtin.command: > |
25 | 26 | wp-cli core config |
26 | 27 | --allow-root --no-color --path='{{ item.path }}' |
27 | 28 | --dbname='{{ item.dbname }}' |
|
36 | 37 | - wordpress-core-configure |
37 | 38 |
|
38 | 39 | - name: core | identify installation |
39 | | - command: > |
| 40 | + ansible.builtin.command: > |
40 | 41 | wp-cli core is-installed |
41 | 42 | --allow-root --no-color --path='{{ item.path }}' |
42 | 43 | register: _check_installation |
|
47 | 48 | - wordpress-core-is-installed |
48 | 49 |
|
49 | 50 | - name: core | install |
50 | | - command: > |
| 51 | + ansible.builtin.command: > |
51 | 52 | wp-cli core install |
52 | 53 | --allow-root --no-color --path='{{ item.item.path }}' |
53 | 54 | --url='{{ item.item.url }}' --title='{{ item.item.title }}' |
54 | 55 | --admin_name='{{ item.item.admin_name | default('admin') }}' |
55 | 56 | --admin_email='{{ item.item.admin_email }}' |
56 | 57 | --admin_password='{{ item.item.admin_password }}' |
| 58 | + changed_when: true |
57 | 59 | with_items: "{{ _check_installation.results | default([]) }}" |
58 | 60 | when: item.rc != 0 |
59 | 61 | tags: |
60 | 62 | - wordpress-core-install |
61 | 63 |
|
62 | 64 | - name: core | check install |
63 | | - command: > |
| 65 | + ansible.builtin.command: > |
64 | 66 | wp-cli core is-installed |
65 | 67 | --allow-root --no-color --path='{{ item.path }}' |
66 | 68 | changed_when: false |
|
0 commit comments