|
1 | 1 | # tasks file |
2 | 2 | --- |
3 | 3 | - name: plugins | identify installation |
4 | | - command: > |
| 4 | + ansible.builtin.command: > |
5 | 5 | wp-cli --allow-root --no-color --path='{{ item.0.path }}' plugin is-installed {{ item.1.name }} |
6 | 6 | register: _check_installation_plugins |
7 | 7 | failed_when: false |
|
14 | 14 | - wordpress-plugins-is-installed-plugin |
15 | 15 |
|
16 | 16 | - name: plugins | install | wordpress.org |
17 | | - command: > |
| 17 | + ansible.builtin.command: > |
18 | 18 | wp-cli --allow-root --no-color --path='{{ item.item.0.path }}' |
19 | 19 | {{ '--force' if item.item.1.force | default(false) else '' }} plugin install {{ item.item.1.name }} |
20 | 20 | with_items: "{{ _check_installation_plugins.results | default([]) }}" |
|
28 | 28 | - wordpress-plugins-install-plugin-wordpress_org |
29 | 29 |
|
30 | 30 | - name: plugins | install | zip | copy |
31 | | - copy: |
| 31 | + ansible.builtin.copy: |
32 | 32 | src: "{{ item.item.1.zip }}" |
33 | 33 | dest: "{{ wordpress_data_path }}/plugins/{{ item.item.1.name }}.zip" |
34 | 34 | owner: root |
|
46 | 46 | - wordpress-plugins-install-plugin-zip-copy |
47 | 47 |
|
48 | 48 | - name: plugins | install | zip | install |
49 | | - command: > |
| 49 | + ansible.builtin.command: > |
50 | 50 | wp-cli --allow-root --no-color --path='{{ item.item.0.path }}' |
51 | 51 | {{ '--force' if item.item.1.force | default(false) else '' }} plugin install {{ wordpress_data_path }}/plugins/{{ item.item.1.name }}.zip |
52 | 52 | with_items: "{{ _check_installation_plugins.results | default([]) }}" |
|
61 | 61 | - wordpress-plugins-install-plugin-zip-install |
62 | 62 |
|
63 | 63 | - name: plugins | install | url |
64 | | - command: > |
| 64 | + ansible.builtin.command: > |
65 | 65 | wp-cli --allow-root --no-color --path='{{ item.item.0.path }}' |
66 | 66 | {{ '--force' if item.item.1.force | default(false) else '' }} plugin install {{ item.item.1.url }} |
67 | 67 | with_items: "{{ _check_installation_plugins.results | default([]) }}" |
|
75 | 75 | - wordpress-plugins-install-plugin-url |
76 | 76 |
|
77 | 77 | - name: plugins | check install |
78 | | - command: > |
| 78 | + ansible.builtin.command: > |
79 | 79 | wp-cli --allow-root --no-color --path='{{ item.0.path }}' plugin is-installed {{ item.1.name }} |
80 | 80 | changed_when: false |
81 | 81 | with_subelements: |
|
86 | 86 | - wordpress-plugins-check-install-plugin |
87 | 87 |
|
88 | 88 | - name: plugins | activate |
89 | | - command: > |
| 89 | + ansible.builtin.command: > |
90 | 90 | wp-cli --allow-root --no-color --path='{{ item.0.path }}' plugin activate {{ item.1.name }} |
91 | 91 | register: _check_activate_plugin |
92 | 92 | changed_when: "'Success: Plugin' in _check_activate_plugin.stdout and not 'already' in _check_activate_plugin.stdout" |
|
100 | 100 | - wordpress-plugins-activate-plugin |
101 | 101 |
|
102 | 102 | - name: plugins | deactivate |
103 | | - command: > |
| 103 | + ansible.builtin.command: > |
104 | 104 | wp-cli --allow-root --no-color --path='{{ item.0.path }}' plugin deactivate {{ item.1.name }} |
105 | 105 | register: _check_deactivate_plugin |
106 | 106 | changed_when: "'Success: Plugin' in _check_deactivate_plugin.stdout and not 'already' in _check_deactivate_plugin.stdout" |
|
0 commit comments