Skip to content

Commit 2674494

Browse files
authored
Merge pull request #62 from Oefenweb/consistency-changes
Consistency changes
2 parents 5962831 + 6307bc0 commit 2674494

File tree

20 files changed

+93
-73
lines changed

20 files changed

+93
-73
lines changed

.ansible-lint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
warn_list:
33
- role-name
4+
- name[play]
45
- name[casing]
5-
- no-handler

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ jobs:
2323
python-version: '3.x'
2424

2525
- name: Install test dependencies
26-
run: pip install ansible-lint[community,yamllint]
26+
run: |
27+
pip install ansible-lint
28+
ansible-galaxy install -r requirements.yml
2729
2830
- name: Lint code
2931
run: |
@@ -42,8 +44,6 @@ jobs:
4244
fail-fast: false
4345
matrix:
4446
include:
45-
- distro: ubuntu1604
46-
ansible-version: '>=2.9, <2.10'
4747
- distro: ubuntu1604
4848
ansible-version: '>=2.10, <2.11'
4949
- distro: ubuntu1604
@@ -62,7 +62,7 @@ jobs:
6262
python-version: '3.x'
6363

6464
- name: Install test dependencies
65-
run: pip install 'ansible${{ matrix.ansible-version }}' molecule[docker] docker
65+
run: pip install 'ansible${{ matrix.ansible-version }}' molecule-plugins[docker] docker
6666

6767
- name: Run Molecule tests
6868
run: |

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: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
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+
- name: include handlers
14+
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: 8 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,17 +11,18 @@
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') }}'
18+
changed_when: true
1819
with_items: "{{ _check_download.results | default([]) }}"
1920
when: item.rc != 0
2021
tags:
2122
- wordpress-core-downloaded
2223

2324
- name: core | configure
24-
command: >
25+
ansible.builtin.command: >
2526
wp-cli core config
2627
--allow-root --no-color --path='{{ item.path }}'
2728
--dbname='{{ item.dbname }}'
@@ -36,7 +37,7 @@
3637
- wordpress-core-configure
3738

3839
- name: core | identify installation
39-
command: >
40+
ansible.builtin.command: >
4041
wp-cli core is-installed
4142
--allow-root --no-color --path='{{ item.path }}'
4243
register: _check_installation
@@ -47,20 +48,21 @@
4748
- wordpress-core-is-installed
4849

4950
- name: core | install
50-
command: >
51+
ansible.builtin.command: >
5152
wp-cli core install
5253
--allow-root --no-color --path='{{ item.item.path }}'
5354
--url='{{ item.item.url }}' --title='{{ item.item.title }}'
5455
--admin_name='{{ item.item.admin_name | default('admin') }}'
5556
--admin_email='{{ item.item.admin_email }}'
5657
--admin_password='{{ item.item.admin_password }}'
58+
changed_when: true
5759
with_items: "{{ _check_installation.results | default([]) }}"
5860
when: item.rc != 0
5961
tags:
6062
- wordpress-core-install
6163

6264
- name: core | check install
63-
command: >
65+
ansible.builtin.command: >
6466
wp-cli core is-installed
6567
--allow-root --no-color --path='{{ item.path }}'
6668
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 }}'

0 commit comments

Comments
 (0)