Skip to content
45 changes: 45 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,51 @@ Marshallwp General Collection Release Notes

.. contents:: Topics

v1.5.5
======

Release Summary
---------------

Fix several variable-naming and templating bugs left over from the migration to ``ansible_facts``, and correct the java role's update-alternatives tasks.

Minor Changes
-------------

- Continued migrating remaining magic variables (`ansible_hostname`, `ansible_distribution_release`, `ansible_architecture`, `ansible_distribution`, `ansible_system`) to their `ansible_facts` equivalents in the `acme_sh`, `deps_mgr`, and `java` roles and tests.

Bugfixes
--------

- acme_sh - Fixed a variable name mismatch (`acme_sh_deps_by_family` renamed to `acme_sh_dependencies`) that prevented the role from installing its required dependencies.
- acme_sh - Corrected a typo (`regexp` to `regex`) in the Jinja test used to detect nsupdate-based DNS challenges, which previously caused a templating error.
- acme_sh - Corrected the README, which documented the old `acme_sh_account_keyfile` and `acme_sh_prehook` variable names instead of the current `acme_sh_account_key_file` and `acme_sh_pre_hook`.
- dirtree - The role now honors the documented `dirtree_owner` variable. It previously referenced an undocumented `dirtree_user` variable, so setting `dirtree_owner` had no effect.
- java - Fixed the update-alternatives tasks, which failed because the `family` parameter was being used incorrectly. They now use the `path`/`link` parameters and point at the correct `/usr/lib/jvm` and `/usr/bin/java` locations.

Documentation Changes
---------------------

- Updated SPDX copyright years to 2026 and removed a leftover `changelogs/.plugin-cache.yaml` reference from `galaxy.yml`.

v1.5.4
======

Release Summary
---------------

Resolve ansible-lint findings by migrating magic variables to ``ansible_facts`` and remove the antsibull-changelog integration.

Breaking Changes
-----------------

- Removed the antsibull-changelog integration (the `changelogs/` directory and its CI workflow job), as it is no longer compatible with the ansible-dev-container. Release notes are now maintained directly in this file.

Minor Changes
-------------

- Migrated magic variables (`ansible_user_id`, `ansible_user_gid`, `ansible_architecture`) to their `ansible_facts` equivalents in the `acme_sh`, `deps_mgr`, `dirtree`, and `java` roles to resolve ansible-lint warnings.

v1.5.3
======

Expand Down
3 changes: 1 addition & 2 deletions galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace: "marshallwp"
name: "general"
version: 1.5.4
version: 1.5.5
readme: README.md
authors:
- William P. Marshall
Expand All @@ -34,7 +34,6 @@ issues: http://github.com/marshallwp/marshallwp.general/issues
# and '.git' are always filtered. Mutually exclusive with 'manifest'
build_ignore:
- .gitignore
- changelogs/.plugin-cache.yaml
- tests/output
# A dict controlling use of manifest directives used in building the collection artifact. The key 'directives' is a
# list of MANIFEST.in style
Expand Down
8 changes: 4 additions & 4 deletions roles/acme_sh/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: 2025 Industrial Info Resources, Inc. <https://www.industrialinfo.com>
SPDX-FileCopyrightText: 2026 Industrial Info Resources, Inc. <https://www.industrialinfo.com>
SPDX-FileContributor: William P. Marshall

SPDX-License-Identifier: GPL-3.0-or-later
Expand All @@ -18,7 +18,7 @@ Using this role will install the following packages on the target:
| **socat** | always |
| **openssl** | always |
| cron/cronnie/mcron/vixie-cron | `acme_sh_scheduler == 'cron'` and you do not have `cron`, `cronie`, `isc-cron`, `mcron`, or `vixie-cron` installed |
| bind-utils/bind-tools/bind9-dnsutils/bind | `acme_sh_mode == 'dns' and acme_sh_mode_value is regexp('dns_nsupdates?')` |
| bind-utils/bind-tools/bind9-dnsutils/bind | `acme_sh_mode == 'dns' and acme_sh_mode_value is regex('dns_nsupdates?')` |
| wget | neither `wget` nor `curl` is installed |


Expand Down Expand Up @@ -51,10 +51,10 @@ Role Variables
| acme_sh_env_variables | A dictionary of environment variables to be set during acme.sh operations. Primarily for dnsapi extensions. | |
| acme_sh_server | Sets the [`--server`](https://github.com/acmesh-official/acme.sh/wiki/Server) parameter. | `letsencrypt_test` |
| acme_sh_account_email | **MANDATORY** The email of the account to request a certificate under. | |
| acme_sh_account_keyfile | **MANDATORY** File containing your account key for authentication with the ACME server | `"{{ acme_sh_home }}/ca_account.key"` |
| acme_sh_account_key_file | **MANDATORY** File containing your account key for authentication with the ACME server | `"{{ acme_sh_home }}/ca_account.key"` |
| acme_sh_keylength | Specifies the domain key length: 2048, 3072, 4096, 8192 or ec-256, ec-384, ec-521. | `ec-384` |
| acme_sh_reloadcmd | Command run after newly renewed certificates are installed | |
| acme_sh_prehook | Pre hook that happens before attempting to issue a certificate | |
| acme_sh_pre_hook | Pre hook that happens before attempting to issue a certificate | |
| acme_sh_post_hook | Post hook that happens after attempting to issue a certificate | |
| acme_sh_renew_hook | Renew hook that is called when certs are *successfully* renewed | |
| acme_sh_run_hook_setup | Setup the hooks and reloadcmd. Useful when the command executed by the hook won't work without the certificates existing first. | `true` |
Expand Down
4 changes: 2 additions & 2 deletions roles/acme_sh/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 Industrial Info Resources, Inc. <https://www.industrialinfo.com>
# SPDX-FileCopyrightText: 2026 Industrial Info Resources, Inc. <https://www.industrialinfo.com>
# SPDX-FileContributor: William P. Marshall
#
# SPDX-License-Identifier: GPL-3.0-or-later
Expand Down Expand Up @@ -126,7 +126,7 @@
# Sets the domain alias to use in place of the actual domain
# See: https://github.com/acmesh-official/acme.sh/wiki/DNS-alias-mode#7-challenge-alias-or-domain-alias
- "{{ (acme_sh_mode == 'dns') | ansible.builtin.ternary('--domain-alias', omit) }}"
- "{{ (acme_sh_mode == 'dns') | ansible.builtin.ternary(ansible_hostname~'.'~acme_sh_dns_zone, omit) }}"
- "{{ (acme_sh_mode == 'dns') | ansible.builtin.ternary(ansible_facts['hostname']~'.'~acme_sh_dns_zone, omit) }}"
- "{{ (acme_sh_mode == 'dns' and (acme_sh_dns_sleep | default(false))) | ansible.builtin.ternary('--dnssleep', omit) }}"
- "{{ (acme_sh_mode == 'dns' and (acme_sh_dns_sleep | default(false))) | ansible.builtin.ternary(acme_sh_dns_sleep | string, omit) }}"
# Sets options for standalone and tls alpn mode.
Expand Down
6 changes: 3 additions & 3 deletions roles/acme_sh/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 Industrial Info Resources, Inc. <https://www.industrialinfo.com>
# SPDX-FileCopyrightText: 2026 Industrial Info Resources, Inc. <https://www.industrialinfo.com>
# SPDX-FileContributor: William P. Marshall
#
# SPDX-License-Identifier: GPL-3.0-or-later
Expand All @@ -7,12 +7,12 @@
# acme.sh requires either wget or curl. If neither exists, install wget (it's smaller than curl)
acme_sh_install_wget: "{{ ansible_facts['packages'] | select('in', ['curl', 'wget']) | length == 0 }}"
# if configuring acme.sh to use nslookup for dns-01 challenges, make sure it's installed.
acme_sh_install_nsupdate: "{{ acme_sh_mode == 'dns' and acme_sh_mode_value is ansible.builtin.regexp('dns_nsupdates?') }}"
acme_sh_install_nsupdate: "{{ acme_sh_mode == 'dns' and acme_sh_mode_value is ansible.builtin.regex('dns_nsupdates?') }}"
# ensure some form of vixie-compatible cron daemon is installed when using cron as the scheduler.
acme_sh_install_cron: "{{ acme_sh_scheduler == 'cron' and (ansible_facts['packages']
| select('in', ['cron', 'cronie', 'isc-cron', 'mcron', 'vixie-cron']) | length == 0) }}"

acme_sh_deps_by_family:
acme_sh_dependencies:
Alpine:
packages:
- openssl
Expand Down
4 changes: 2 additions & 2 deletions roles/deps_mgr/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 Industrial Info Resources, Inc. <https://www.industrialinfo.com>
# SPDX-FileCopyrightText: 2026 Industrial Info Resources, Inc. <https://www.industrialinfo.com>
# SPDX-FileContributor: William P. Marshall
#
# SPDX-License-Identifier: GPL-3.0-or-later
Expand Down Expand Up @@ -44,7 +44,7 @@ deps_mgr_list:
# RedHat:
# repositories:
# - repo_type: dnf-config
# name: "rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_architecture }}-appstream-rpms"
# name: "rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-appstream-rpms"
# Rocky:
# repositories:
# - repo_type: dnf-config
Expand Down
2 changes: 1 addition & 1 deletion roles/dirtree/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: "{{ dirtree_user | default(ansible_facts['user_id'], true) }}"
owner: "{{ dirtree_owner | default(ansible_facts['user_id'], true) }}"
group: "{{ dirtree_group | default(ansible_facts['user_gid'], true) | marshallwp.general.get_grpname }}"
mode: "{{ dirtree_mode | default() }}"
loop: "{{ dirtree_tree | marshallwp.general.generate_paths(dirtree_root) }}"
2 changes: 1 addition & 1 deletion roles/java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Role Variables
| java_use_headless | Headless variants exclude GUI components and are good for terminal-only servers. | true |
| java_vendor | The vendor providing you with Java. `Default` means your distro's default repositories. | Default |
| java_variant | Some vendors provide multiple versions of Java. This variable lets you specify which to install. | OpenJDK |
| java_install_directory | Install directory for non-repository-based installs. | `/usr/lib/jvm/{{ java_type }}-{{ java_version }}-{{ java_vendor }}-{{ ansible_architecture }}` |
| java_install_directory | Install directory for non-repository-based installs. | `/usr/lib/jvm/{{ java_type }}-{{ java_version }}-{{ java_vendor }}-{{ ansible_facts.architecture }}` |
| java_archive_download_dir | Archive download directory for non-repository-based installs. | `/tmp` |
| java_update_alternatives | Enable or disable updating alternatives for Java | false |
| java_archive_exts | When not installing from a repository, file extension will determine whether a file is installed via ansible.builtin.package or extracted via ansible.builtin.unarchive. Files with extensions matching this list will go through the latter process. | `['.bz2','.tbz','.gz','.tgz','.lz','.lzma','.tlz','.xz','.txz','.zst','.tzst']` |
Expand Down
4 changes: 2 additions & 2 deletions roles/java/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 Industrial Info Resources, Inc. <https://www.industrialinfo.com>
# SPDX-FileCopyrightText: 2026 Industrial Info Resources, Inc. <https://www.industrialinfo.com>
# SPDX-FileContributor: William P. Marshall
#
# SPDX-License-Identifier: GPL-3.0-or-later
Expand Down Expand Up @@ -106,7 +106,7 @@ argument_specs:
- Java
java_install_directory:
description: Install directory for non-repository-based installs.
default: '/usr/lib/jvm/{{ java_type }}-{{ java_version }}-{{ java_vendor }}-{{ ansible_architecture }}'
default: '/usr/lib/jvm/{{ java_type }}-{{ java_version }}-{{ java_vendor }}-{{ ansible_facts.architecture }}'
java_archive_download_dir:
description: Archive download directory for non-repository-based installs.
default: /tmp
Expand Down
22 changes: 9 additions & 13 deletions roles/java/tasks/download-and-install.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 Industrial Info Resources, Inc. <https://www.industrialinfo.com>
# SPDX-FileCopyrightText: 2026 Industrial Info Resources, Inc. <https://www.industrialinfo.com>
# SPDX-FileContributor: William P. Marshall
#
# SPDX-License-Identifier: GPL-3.0-or-later
Expand Down Expand Up @@ -26,10 +26,6 @@
# For Archive-based installations
- name: Install {{ java_vendor ~ ' ' ~ java_variant ~ ' Java ' ~ java_version ~ ' from Archive' }}
when: (java_archive_path | ansible.builtin.splitext)[1] in java_archive_exts
vars:
# Only RedHat-based distros support the family parameter.
alternatives_family: "{{ (ansible_facts['os_family'] == 'RedHat') | ansible.builtin.ternary(
java_family ~ '-java-' ~ java_version ~ '.' ~ ansible_architecture, undef())}}"
become: true
block:
- name: Ensure Destination Directory Exists
Expand All @@ -51,22 +47,22 @@
when: java_update_alternatives | default(false)
community.general.alternatives:
name: "jre_{{ java_version }}"
family: "{{ alternatives_family | default() }}"
link: "{{ java_install_directory }}"
path: "{{ java_install_directory }}"
link: "/usr/lib/jvm/jre_{{ java_version }}"
- name: Update Alternatives - java_sdk_{{ java_version }}
when:
- java_update_alternatives | default(false)
- java_type == 'jdk'
community.general.alternatives:
name: "java_sdk_{{ java_version }}"
family: "{{ alternatives_family | default() }}"
link: "{{ java_install_directory }}"
path: "{{ java_install_directory }}"
link: "/usr/lib/jvm/java_sdk_{{ java_version }}"
- name: Update Alternatives - java (JRE)
when: java_update_alternatives | default(false)
community.general.alternatives:
name: java
family: "{{ alternatives_family | default() }}"
link: "{{ (java_install_directory, 'bin', 'java') | ansible.builtin.path_join }}"
path: "{{ (java_install_directory, 'bin', 'java') | ansible.builtin.path_join }}"
link: /usr/bin/java
state: auto
subcommands:
- name: jre
Expand All @@ -84,8 +80,8 @@
- java_type == 'jdk'
community.general.alternatives:
name: java
family: "{{ alternatives_family | default() }}"
link: "{{ (java_install_directory, 'bin', 'java') | ansible.builtin.path_join }}"
path: "{{ (java_install_directory, 'bin', 'java') | ansible.builtin.path_join }}"
link: /usr/bin/java
state: auto
subcommands:
- name: jcmd
Expand Down
14 changes: 7 additions & 7 deletions roles/java/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 Industrial Info Resources, Inc. <https://www.industrialinfo.com>
# SPDX-FileCopyrightText: 2026 Industrial Info Resources, Inc. <https://www.industrialinfo.com>
# SPDX-FileContributor: William P. Marshall
#
# SPDX-License-Identifier: GPL-3.0-or-later
Expand Down Expand Up @@ -212,7 +212,7 @@ java_packages:
- repo_type: yum
name: adoptium
description: Adoptium
baseurl: "https://packages.adoptium.net/artifactory/rpm/{{ ansible_distribution | lower }}/$releasever/$basearch"
baseurl: "https://packages.adoptium.net/artifactory/rpm/{{ ansible_facts['distribution'] | lower }}/$releasever/$basearch"
gpgkey: https://packages.adoptium.net/artifactory/api/gpg/key/public
gpgcheck: true
packages:
Expand Down Expand Up @@ -256,15 +256,15 @@ java_archives:
Oracle:
GraalVM:
url: "https://download.oracle.com/graalvm/{{ java_version }}/latest/graalvm-jdk-{{
java_version }}_{{ ansible_system | lower }}-{{ java_oracle_arch }}_bin.tar.gz"
java_version }}_{{ ansible_facts['system'] | lower }}-{{ java_oracle_arch }}_bin.tar.gz"
checksum: "sha256:https://download.oracle.com/graalvm/{{ java_version }}/latest/graalvm-jdk-{{
java_version }}_{{ ansible_system | lower }}-{{ java_oracle_arch }}_bin.tar.gz.sha256"
java_version }}_{{ ansible_facts['system'] | lower }}-{{ java_oracle_arch }}_bin.tar.gz.sha256"
Java:
url: "https://download.oracle.com/java/{{ java_version }}/latest/jdk-{{
java_version }}_{{ ansible_system | lower }}-{{ java_oracle_arch }}_bin.{{
java_version }}_{{ ansible_facts['system'] | lower }}-{{ java_oracle_arch }}_bin.{{
{'RedHat': 'rpm', 'Debian': 'deb'}[ansible_facts['os_family']] | default('tar.gz') }}"
checksum: "sha256:https://download.oracle.com/java/{{ java_version }}/latest/jdk-{{
java_version }}_{{ ansible_system | lower }}-{{ java_oracle_arch }}_bin.{{
java_version }}_{{ ansible_facts['system'] | lower }}-{{ java_oracle_arch }}_bin.{{
{'RedHat': 'rpm', 'Debian': 'deb'}[ansible_facts['os_family']] | default('tar.gz') }}.sha256"


Expand All @@ -274,4 +274,4 @@ java_archive_path: "{{
}}"

# Oracle download files use weird architecture strings.
java_oracle_arch: "{{ {'x86_64': 'x64'}[ansible_architecture] | default(ansible_architecture) }}"
java_oracle_arch: "{{ {'x86_64': 'x64'}[ansible_facts['architecture']] | default(ansible_facts['architecture']) }}"
4 changes: 2 additions & 2 deletions tests/integration/targets/role_deps_mgr/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 Industrial Info Resources, Inc. <https://www.industrialinfo.com>
# SPDX-FileCopyrightText: 2026 Industrial Info Resources, Inc. <https://www.industrialinfo.com>
# SPDX-FileContributor: William P. Marshall
#
# SPDX-License-Identifier: GPL-3.0-or-later
Expand All @@ -13,7 +13,7 @@ deps_mgr_list:
Ubuntu:
repositories:
- repo_type: apt
name: "deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }} universe"
name: "deb http://archive.ubuntu.com/ubuntu {{ ansible_facts['distribution_release'] }} universe"
state: present
packages:
- hello
Loading