Skip to content

Commit a2eb154

Browse files
committed
Make use of fully-qualified collection name
1 parent 44c746f commit a2eb154

18 files changed

Lines changed: 78 additions & 67 deletions

molecule/default/converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
become: true
55
pre_tasks:
66
- name: include vars
7-
include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
7+
ansible.builtin.include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
88
roles:
99
- ../../../

molecule/default/prepare.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
become: true
55
tasks:
66
- name: include vars
7-
include_vars: "{{ playbook_dir }}/../../defaults/main.yml"
7+
ansible.builtin.include_vars: "{{ playbook_dir }}/../../defaults/main.yml"
88
- name: include vars
9-
include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
9+
ansible.builtin.include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
1010
- name: include tasks
11-
include: "{{ playbook_dir }}/../../tests/tasks/pre.yml"
11+
ansible.builtin.import_tasks: "{{ playbook_dir }}/../../tests/tasks/pre.yml"
1212
handlers:
13-
- import_tasks: "{{ playbook_dir }}/../../tests/handlers/main.yml"
13+
- ansible.builtin.import_tasks: "{{ playbook_dir }}/../../tests/handlers/main.yml"

requirements.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# requirements file
22
---
3-
collections: []
3+
collections:
4+
- name: community.mysql

tasks/chown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tasks file
22
---
33
- name: change owner (and group)
4-
file:
4+
ansible.builtin.file:
55
path: "{{ item.path }}"
66
owner: "{{ item.owner | default('www-data') }}"
77
group: "{{ item.group | default(item.owner) | default('www-data') }}"

tasks/configure.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tasks file
22
---
33
- name: configure | create (data) directories
4-
file:
4+
ansible.builtin.file:
55
path: "{{ item }}"
66
state: directory
77
owner: root

tasks/core.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tasks file
22
---
33
- name: core | check download
4-
command: >
4+
ansible.builtin.command: >
55
test -f {{ item.path }}/wp-load.php
66
register: _check_download
77
failed_when: false
@@ -11,7 +11,7 @@
1111
- wordpress-core-is-downloaded
1212

1313
- name: core | download
14-
command: >
14+
ansible.builtin.command: >
1515
wp-cli core download
1616
--allow-root --no-color --path='{{ item.item.path }}'
1717
--locale='{{ item.item.locale | default('en_US') }}'
@@ -21,7 +21,7 @@
2121
- wordpress-core-downloaded
2222

2323
- name: core | configure
24-
command: >
24+
ansible.builtin.command: >
2525
wp-cli core config
2626
--allow-root --no-color --path='{{ item.path }}'
2727
--dbname='{{ item.dbname }}'
@@ -36,7 +36,7 @@
3636
- wordpress-core-configure
3737

3838
- name: core | identify installation
39-
command: >
39+
ansible.builtin.command: >
4040
wp-cli core is-installed
4141
--allow-root --no-color --path='{{ item.path }}'
4242
register: _check_installation
@@ -47,7 +47,7 @@
4747
- wordpress-core-is-installed
4848

4949
- name: core | install
50-
command: >
50+
ansible.builtin.command: >
5151
wp-cli core install
5252
--allow-root --no-color --path='{{ item.item.path }}'
5353
--url='{{ item.item.url }}' --title='{{ item.item.title }}'
@@ -60,7 +60,7 @@
6060
- wordpress-core-install
6161

6262
- name: core | check install
63-
command: >
63+
ansible.builtin.command: >
6464
wp-cli core is-installed
6565
--allow-root --no-color --path='{{ item.path }}'
6666
changed_when: false

tasks/main.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,70 @@
11
# tasks file
22
---
3-
- include: wp-cli.yml
3+
- name: wp-cli
4+
ansible.builtin.import_tasks: wp-cli.yml
45
tags:
56
- configuration
67
- wordpress
78
- wordpress-wp-cli
89

9-
- include: core.yml
10+
- name: core
11+
ansible.builtin.import_tasks: core.yml
1012
tags:
1113
- configuration
1214
- wordpress
1315
- wordpress-core
1416

15-
- include: configure.yml
17+
- name: configure
18+
ansible.builtin.import_tasks: configure.yml
1619
tags:
1720
- configuration
1821
- wordpress
1922
- wordpress-configure
2023

21-
- include: wp-cron.yml
24+
- name: wp-cron
25+
ansible.builtin.import_tasks: wp-cron.yml
2226
tags:
2327
- configuration
2428
- wordpress
2529
- wordpress-wp-cron
2630

27-
- include: themes.yml
31+
- name: themes
32+
ansible.builtin.import_tasks: themes.yml
2833
tags:
2934
- configuration
3035
- wordpress
3136
- wordpress-themes
3237

33-
- include: plugins.yml
38+
- name: plugins
39+
ansible.builtin.import_tasks: plugins.yml
3440
tags:
3541
- configuration
3642
- wordpress
3743
- wordpress-plugins
3844

39-
- include: users.yml
45+
- name: users
46+
ansible.builtin.import_tasks: users.yml
4047
tags:
4148
- configuration
4249
- wordpress
4350
- wordpress-users
4451

45-
- include: options.yml
52+
- name: options
53+
ansible.builtin.import_tasks: options.yml
4654
tags:
4755
- configuration
4856
- wordpress
4957
- wordpress-options
5058

51-
- include: queries.yml
59+
- name: queries
60+
ansible.builtin.import_tasks: queries.yml
5261
tags:
5362
- configuration
5463
- wordpress
5564
- wordpress-queries
5665

57-
- include: chown.yml
66+
- name: chown
67+
ansible.builtin.import_tasks: chown.yml
5868
tags:
5969
- configuration
6070
- wordpress

tasks/options.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tasks file
22
---
33
- name: add options
4-
command: >
4+
ansible.builtin.command: >
55
wp-cli option
66
--allow-root --no-color --path='{{ item.0.path }}'
77
{{ item.1.command }} '{{ item.1.name }}' '{{ item.1.value }}' --autoload={{ 'yes' if item.1.autoload | default(true) else 'no' }}
@@ -16,7 +16,7 @@
1616
- wordpress-options-add
1717

1818
- name: update options
19-
command: >
19+
ansible.builtin.command: >
2020
wp-cli option
2121
--allow-root --no-color --path='{{ item.0.path }}'
2222
{{ item.1.command }} '{{ item.1.name }}' '{{ item.1.value }}'
@@ -30,7 +30,7 @@
3030
- wordpress-options-update
3131

3232
- name: delete options
33-
command: >
33+
ansible.builtin.command: >
3434
wp-cli option
3535
--allow-root --no-color --path='{{ item.0.path }}'
3636
{{ item.1.command }} '{{ item.1.name }}'

tasks/plugins.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tasks file
22
---
33
- name: plugins | identify installation
4-
command: >
4+
ansible.builtin.command: >
55
wp-cli --allow-root --no-color --path='{{ item.0.path }}' plugin is-installed {{ item.1.name }}
66
register: _check_installation_plugins
77
failed_when: false
@@ -14,7 +14,7 @@
1414
- wordpress-plugins-is-installed-plugin
1515

1616
- name: plugins | install | wordpress.org
17-
command: >
17+
ansible.builtin.command: >
1818
wp-cli --allow-root --no-color --path='{{ item.item.0.path }}'
1919
{{ '--force' if item.item.1.force | default(false) else '' }} plugin install {{ item.item.1.name }}
2020
with_items: "{{ _check_installation_plugins.results | default([]) }}"
@@ -28,7 +28,7 @@
2828
- wordpress-plugins-install-plugin-wordpress_org
2929

3030
- name: plugins | install | zip | copy
31-
copy:
31+
ansible.builtin.copy:
3232
src: "{{ item.item.1.zip }}"
3333
dest: "{{ wordpress_data_path }}/plugins/{{ item.item.1.name }}.zip"
3434
owner: root
@@ -46,7 +46,7 @@
4646
- wordpress-plugins-install-plugin-zip-copy
4747

4848
- name: plugins | install | zip | install
49-
command: >
49+
ansible.builtin.command: >
5050
wp-cli --allow-root --no-color --path='{{ item.item.0.path }}'
5151
{{ '--force' if item.item.1.force | default(false) else '' }} plugin install {{ wordpress_data_path }}/plugins/{{ item.item.1.name }}.zip
5252
with_items: "{{ _check_installation_plugins.results | default([]) }}"
@@ -61,7 +61,7 @@
6161
- wordpress-plugins-install-plugin-zip-install
6262

6363
- name: plugins | install | url
64-
command: >
64+
ansible.builtin.command: >
6565
wp-cli --allow-root --no-color --path='{{ item.item.0.path }}'
6666
{{ '--force' if item.item.1.force | default(false) else '' }} plugin install {{ item.item.1.url }}
6767
with_items: "{{ _check_installation_plugins.results | default([]) }}"
@@ -75,7 +75,7 @@
7575
- wordpress-plugins-install-plugin-url
7676

7777
- name: plugins | check install
78-
command: >
78+
ansible.builtin.command: >
7979
wp-cli --allow-root --no-color --path='{{ item.0.path }}' plugin is-installed {{ item.1.name }}
8080
changed_when: false
8181
with_subelements:
@@ -86,7 +86,7 @@
8686
- wordpress-plugins-check-install-plugin
8787

8888
- name: plugins | activate
89-
command: >
89+
ansible.builtin.command: >
9090
wp-cli --allow-root --no-color --path='{{ item.0.path }}' plugin activate {{ item.1.name }}
9191
register: _check_activate_plugin
9292
changed_when: "'Success: Plugin' in _check_activate_plugin.stdout and not 'already' in _check_activate_plugin.stdout"
@@ -100,7 +100,7 @@
100100
- wordpress-plugins-activate-plugin
101101

102102
- name: plugins | deactivate
103-
command: >
103+
ansible.builtin.command: >
104104
wp-cli --allow-root --no-color --path='{{ item.0.path }}' plugin deactivate {{ item.1.name }}
105105
register: _check_deactivate_plugin
106106
changed_when: "'Success: Plugin' in _check_deactivate_plugin.stdout and not 'already' in _check_deactivate_plugin.stdout"

tasks/queries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tasks file
22
---
33
- name: queries | execute queries
4-
command: >
4+
ansible.builtin.command: >
55
wp-cli db query
66
--allow-root --no-color --path='{{ item.0.path }}'
77
"{{ item.1 }}; SELECT ROW_COUNT();"

0 commit comments

Comments
 (0)