Skip to content

Commit 71384af

Browse files
authored
Merge pull request #64 from Oefenweb/consistency-changes
Consistency changes
2 parents 5e819f6 + c8c3496 commit 71384af

15 files changed

Lines changed: 102 additions & 89 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Check out the codebase
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v5
1919

2020
- name: Set up Python 3
21-
uses: actions/setup-python@v4
21+
uses: actions/setup-python@v6
2222
with:
23-
python-version: '3.x'
23+
python-version: '3 - 3.13'
2424

2525
- name: Install test dependencies
2626
run: |
@@ -44,25 +44,27 @@ jobs:
4444
fail-fast: false
4545
matrix:
4646
include:
47-
- distro: ubuntu1604
48-
ansible-version: '>=2.10, <2.11'
49-
- distro: ubuntu1604
5047
- distro: ubuntu1804
48+
ansible-version: '>=9, <10'
5149
- distro: ubuntu2004
50+
ansible-version: '>=12, <13'
51+
- distro: ubuntu2204
52+
- distro: ubuntu2404
5253

5354
steps:
5455
- name: Check out the codebase
55-
uses: actions/checkout@v3
56+
uses: actions/checkout@v5
5657
with:
5758
path: "${{ github.repository }}"
5859

5960
- name: Set up Python 3
60-
uses: actions/setup-python@v4
61+
uses: actions/setup-python@v6
6162
with:
62-
python-version: '3.x'
63+
python-version: '3 - 3.13'
6364

6465
- name: Install test dependencies
65-
run: pip install 'ansible${{ matrix.ansible-version }}' molecule-plugins[docker] docker
66+
run: |
67+
pip install 'ansible${{ matrix.ansible-version }}' molecule-plugins[docker] docker
6668
6769
- name: Run Molecule tests
6870
run: |

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Check out the codebase
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v5
1616

1717
- name: Publish to Galaxy
1818
uses: robertdebock/galaxy-action@1.2.0

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Build Status](https://travis-ci.org/Oefenweb/ansible-wordpress.svg?branch=master)](https://travis-ci.org/Oefenweb/ansible-wordpress) [![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-wordpress-blue.svg)](https://galaxy.ansible.com/Oefenweb/wordpress)
44

5-
Set up (multiple) wordpress installations in Debian-like systems (using `wp-cli`).
5+
Set up (multiple) WordPress installations in Debian-like systems (using `wp-cli`).
66

77
#### Requirements
88

@@ -23,18 +23,18 @@ This role assumes a working virtual host (that handles `wordpress_url`).
2323
* `wordpress_installs.{n}.dbpass`: [required]: Database password (**make sure to change**)
2424
* `wordpress_installs.{n}.dbhost`: [default: `localhost`, optional]: Database host
2525
* `wordpress_installs.{n}.dbprefix`: [default: `wp_`, optional]: Prefix for database tables
26-
* `wordpress_installs.{n}.path`: [required]: Install directory for wordpress
27-
* `wordpress_installs.{n}.locale`: [default: `en_US`, optional]: Language of the downloaded Wordpress
26+
* `wordpress_installs.{n}.path`: [required]: Install directory for WordPress
27+
* `wordpress_installs.{n}.locale`: [default: `en_US`, optional]: Language of the downloaded WordPress
2828
* `wordpress_installs.{n}.owner`: [default: `www-data`]: The name of the user that should own the install
2929
* `wordpress_installs.{n}.group`: [default: `owner`, `www-data`]: The name of the group that should own the install
30-
* `wordpress_installs.{n}.url`: [required]: Wordpress url
31-
* `wordpress_installs.{n}.title`: [required]: Wordpress title
32-
* `wordpress_installs.{n}.admin_name`: [default: `admin`, optional]: Wordpress admin (user)name
33-
* `wordpress_installs.{n}.admin_email`: [required]: Wordpress admin email address
34-
* `wordpress_installs.{n}.admin_password`: [required]: Wordpress admin password (**make sure to change**)
30+
* `wordpress_installs.{n}.url`: [required]: WordPress url
31+
* `wordpress_installs.{n}.title`: [required]: WordPress title
32+
* `wordpress_installs.{n}.admin_name`: [default: `admin`, optional]: WordPress admin (user)name
33+
* `wordpress_installs.{n}.admin_email`: [required]: WordPress admin email address
34+
* `wordpress_installs.{n}.admin_password`: [required]: WordPress admin password (**make sure to change**)
3535

3636
* `wordpress_installs.{n}.cron`: [optional]: Cron declaration
37-
* `wordpress_installs.{n}.cron.use_crond`: [default: `false`]: Whether or not to use `crond` instead of wp-cron
37+
* `wordpress_installs.{n}.cron.use_crond`: [default: `false`]: Whether to use `crond` instead of wp-cron
3838
* `wordpress_installs.{n}.cron.user`: [default: `www-data`]: User to run job as
3939
* `wordpress_installs.{n}.cron.schedule`: [optional]: Cron schedule declaration
4040
* `wordpress_installs.{n}.cron.schedule.day`: [default: `*`]: Day when the job should run
@@ -45,18 +45,18 @@ This role assumes a working virtual host (that handles `wordpress_url`).
4545

4646
* `wordpress_installs.{n}.themes`: [required]: (Additional) themes to install (and activate)
4747
* `wordpress_installs.{n}.themes.{n}.name`: [required]: Name of the theme
48-
* `wordpress_installs.{n}.themes.{n}.activate`: [default: `false`, optional]: Whether or not to activate the theme
48+
* `wordpress_installs.{n}.themes.{n}.activate`: [default: `false`, optional]: Whether to activate the theme
4949

5050
* `wordpress_installs.{n}.plugins`: [required]: (Additional) plugins to install (and activate)
5151
* `wordpress_installs.{n}.plugins.{n}.name`: [required]: Name of the plugin
5252
* `wordpress_installs.{n}.plugins.{n}.zip`: [optional]: Zip of the plugin
5353
* `wordpress_installs.{n}.plugins.{n}.url`: [optional]: Url of the plugin
5454
* `wordpress_installs.{n}.plugins.{n}.activate`: [default: `true`, optional]: Whether to activate or to deactivate the plugin
55-
* `wordpress_installs.{n}.plugins.{n}.force`: [default: `false`, optional]: Whether or not to add the `--force` option during install
55+
* `wordpress_installs.{n}.plugins.{n}.force`: [default: `false`, optional]: Whether to add the `--force` option during install
5656

5757
* `wordpress_installs.{n}.users`: [optional]: User declarations
5858
* `wordpress_installs.{n}.users.src`: [required]: The local path of the [csv file](http://wp-cli.org/commands/user/import-csv/) to import, can be absolute or relative (e.g. `../../../files/wordpress/users.csv`)
59-
* `wordpress_installs.{n}.users.skip_update`: [default: `true`, optional]: Whether or not to update users that already exist
59+
* `wordpress_installs.{n}.users.skip_update`: [default: `true`, optional]: Whether to update users that already exist
6060

6161
* `wordpress_installs.{n}.options`: [required]: Options to add, update or delete
6262
* `wordpress_installs.{n}.options.{n}.command`: [required]: Add, update or delete

Vagrantfile

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,33 @@
44
role = File.basename(File.expand_path(File.dirname(__FILE__)))
55

66
boxes = [
7-
{
8-
:name => "ubuntu-1604",
9-
:box => "bento/ubuntu-16.04",
10-
:ip => '10.0.0.13',
11-
:cpu => "50",
12-
:ram => "256"
13-
},
147
{
158
:name => "ubuntu-1804",
169
:box => "bento/ubuntu-18.04",
17-
:ip => '10.0.0.14',
10+
:ip => '10.0.0.13',
1811
:cpu => "50",
1912
:ram => "384"
2013
},
2114
{
2215
:name => "ubuntu-2004",
2316
:box => "bento/ubuntu-20.04",
17+
:ip => '10.0.0.14',
18+
:cpu => "50",
19+
:ram => "512"
20+
},
21+
{
22+
:name => "ubuntu-2204",
23+
:box => "bento/ubuntu-22.04",
2424
:ip => '10.0.0.15',
2525
:cpu => "50",
26-
:ram => "384"
26+
:ram => "512"
27+
},
28+
{
29+
:name => "ubuntu-2404",
30+
:box => "bento/ubuntu-24.04",
31+
:ip => '10.0.0.16',
32+
:cpu => "50",
33+
:ram => "512"
2734
},
2835
]
2936

meta/main.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,14 @@ galaxy_info:
1111
platforms:
1212
- name: Ubuntu
1313
versions:
14-
- precise
15-
- trusty
16-
- xenial
1714
- bionic
15+
- focal
16+
- jammy
17+
- noble
1818
- name: Debian
1919
versions:
20-
- wheezy
21-
- jessie
22-
- stretch
23-
- buster
20+
- bullseye
21+
- bookworm
2422
galaxy_tags:
2523
- web
2624
dependencies: []

molecule/default/collections.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
---
2-
collections:
3-
- name: community.docker
4-
version: '>=1.2.0,<2'
5-
- name: community.general
6-
version: '>=2,<3'
2+
collections: []

molecule/default/molecule.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ driver:
55
name: docker
66
platforms:
77
- name: instance
8-
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu1604}-ansible:latest"
8+
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest"
99
command: ${MOLECULE_DOCKER_COMMAND:-""}
1010
volumes:
1111
- /sys/fs/cgroup:/sys/fs/cgroup:rw

tasks/configure.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
state: directory
77
owner: root
88
group: root
9-
mode: 0755
9+
mode: '0755'
1010
with_items:
1111
- "{{ wordpress_data_path }}/themes"
1212
- "{{ wordpress_data_path }}/plugins"

tasks/plugins.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
with_subelements:
1010
- "{{ wordpress_installs }}"
1111
- plugins
12-
when: item.1
12+
when: item.1.name | length > 0
1313
tags:
1414
- wordpress-plugins-is-installed-plugin
1515

@@ -20,7 +20,7 @@
2020
changed_when: true
2121
with_items: "{{ _check_installation_plugins.results | default([]) }}"
2222
when:
23-
- item.item.1.name
23+
- item.item.1.name | length > 0
2424
- not item.item.1.zip | default(false)
2525
- not item.item.1.url | default(false)
2626
- item.rc != 0
@@ -34,10 +34,10 @@
3434
dest: "{{ wordpress_data_path }}/plugins/{{ item.item.1.name }}.zip"
3535
owner: root
3636
group: root
37-
mode: 0644
37+
mode: '0644'
3838
with_items: "{{ _check_installation_plugins.results | default([]) }}"
3939
when:
40-
- item.item.1.name
40+
- item.item.1.name | length > 0
4141
- item.item.1.zip | default(false)
4242
- not item.item.1.url | default(false)
4343
- item.rc != 0
@@ -53,7 +53,7 @@
5353
changed_when: true
5454
with_items: "{{ _check_installation_plugins.results | default([]) }}"
5555
when:
56-
- item.item.1.name
56+
- item.item.1.name | length > 0
5757
- item.item.1.zip | default(false)
5858
- not item.item.1.url | default(false)
5959
- item.rc != 0
@@ -69,7 +69,7 @@
6969
changed_when: true
7070
with_items: "{{ _check_installation_plugins.results | default([]) }}"
7171
when:
72-
- item.item.1.name
72+
- item.item.1.name | length > 0
7373
- not item.item.1.zip | default(false)
7474
- item.item.1.url | default(false)
7575
- item.rc != 0
@@ -84,7 +84,7 @@
8484
with_subelements:
8585
- "{{ wordpress_installs }}"
8686
- plugins
87-
when: item.1.name
87+
when: item.1.name | length > 0
8888
tags:
8989
- wordpress-plugins-check-install-plugin
9090

@@ -97,8 +97,8 @@
9797
- "{{ wordpress_installs }}"
9898
- plugins
9999
when:
100-
- item.1.name
101-
- item.1.activate | default(true)
100+
- item.1.name | length > 0
101+
- item.1.activate | bool | default(true)
102102
tags:
103103
- wordpress-plugins-activate-plugin
104104

@@ -111,7 +111,7 @@
111111
- "{{ wordpress_installs }}"
112112
- plugins
113113
when:
114-
- item.1.name
115-
- not item.1.activate | default(true)
114+
- item.1.name | length > 0
115+
- not item.1.activate | bool | default(true)
116116
tags:
117117
- wordpress-plugins-deactivate-plugin

tasks/themes.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
with_subelements:
1010
- "{{ wordpress_installs }}"
1111
- themes
12-
when: item.1.name
12+
when: item.1.name | length > 0
1313
tags:
1414
- wordpress-themes-is-installed-theme
1515

@@ -19,7 +19,7 @@
1919
changed_when: true
2020
with_items: "{{ _check_installation_themes.results | default([]) }}"
2121
when:
22-
- item.item.1.name
22+
- item.item.1.name | length > 0
2323
- item.rc != 0
2424
tags:
2525
- wordpress-themes-install-theme
@@ -31,7 +31,7 @@
3131
with_subelements:
3232
- "{{ wordpress_installs }}"
3333
- themes
34-
when: item.1.name
34+
when: item.1.name | length > 0
3535
tags:
3636
- wordpress-themes-install-theme-check
3737

@@ -44,7 +44,7 @@
4444
- "{{ wordpress_installs }}"
4545
- themes
4646
when:
47-
- item.1.name
48-
- item.1.activate | default(false)
47+
- item.1.name | length > 0
48+
- item.1.activate | bool | default(false)
4949
tags:
5050
- wordpress-themes-activate-theme

0 commit comments

Comments
 (0)