Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

* **role:php**: The `php:update` tag now refreshes the apt cache before the upgrade on Debian-family hosts, so it reliably installs the latest packages (e.g. to roll out security updates) instead of running against a stale cache. RHEL-family hosts are unaffected, since dnf refreshes its metadata on its own.
* **role:monitoring_plugins**: The role now refreshes the apt cache before installing the monitoring-plugins package on Debian-family hosts, so it reliably installs the latest version (e.g. to roll out security updates) instead of running against a stale cache. RHEL-family hosts are unaffected, since dnf refreshes its metadata on its own.
* **role:mariadb_server**: The `mariadb_server:upgrade` tag now refreshes the apt cache before the upgrade on Debian-family hosts, so it reliably installs the latest packages (e.g. to roll out security updates) instead of running against a stale cache. RHEL-family hosts are unaffected, since dnf refreshes its metadata on its own.
* **role:system_update**: The update and security-update jobs no longer send a failure mail when a mirror hiccups briefly (e.g. Rocky's mirrorlist intermittently returning "No URLs in mirrorlist"). Repository metadata is now refreshed with a few retries before updates are applied, so short-lived upstream outages are ridden out instead of paging you.
* **role:monitoring_plugins, role:mod_maxminddb**: The role no longer aborts at start with an `undefined` error demanding a variable that has an OS-specific default (`monitoring_plugins__icinga_user` respectively `mod_maxminddb__apache_conf_modules_d`). The role now derives the default on its own again, so there is no need to set the variable in the inventory.
* **role:monitoring_plugins**: A source install no longer aborts on RHEL 8. The role used to fail because the system Python 3.6 is older than the required 3.9; it now installs and uses Python 3.9 automatically.
Expand Down
10 changes: 10 additions & 0 deletions roles/mariadb_server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@
- 'mariadb-server'
state: 'absent'

# refresh the apt cache so the following `state: latest` upgrade resolves
# against current metadata, e.g. to roll out security updates. apt does not
# auto-expire its cache the way dnf does, so without this the upgrade can
# silently run against a stale cache and miss newer versions.
- name: 'apt update # update the cache'
ansible.builtin.apt:
update_cache: true
changed_when: false # refreshing the package cache is not a config change
when: 'ansible_facts["os_family"] == "Debian"'

- name: 'Install latest mariadb-server' # noqa package-latest (latest is necessary for upgrade)
ansible.builtin.package:
name:
Expand Down
10 changes: 10 additions & 0 deletions roles/monitoring_plugins/tasks/linux-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@

- block:

# refresh the apt cache so the following `state: latest` upgrade resolves
# against current metadata, e.g. to roll out security updates. apt does not
# auto-expire its cache the way dnf does, so without this the upgrade can
# silently run against a stale cache and miss newer versions.
- name: 'apt update # update the cache'
ansible.builtin.apt:
update_cache: true
changed_when: false # refreshing the package cache is not a config change
when: 'ansible_facts["os_family"] == "Debian"'

- name: 'install linuxfabrik-monitoring-plugins{{ __monitoring_plugins__package_version_separator }}{{ monitoring_plugins__version }}*' # noqa package-latest
ansible.builtin.package:
name:
Expand Down
20 changes: 20 additions & 0 deletions roles/php/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@

- block:

# refresh the apt cache so the following `state: latest` upgrade resolves
# against current metadata, e.g. to roll out security updates. apt does not
# auto-expire its cache the way dnf does, so without this the upgrade can
# silently run against a stale cache and miss newer versions.
- name: 'apt update # update the cache'
ansible.builtin.apt:
update_cache: true
changed_when: false # refreshing the package cache is not a config change
when: 'ansible_facts["os_family"] == "Debian"'

- name: 'Update php php-fpm composer' # noqa package-latest (we explicitly want latest here)
ansible.builtin.package:
name:
Expand Down Expand Up @@ -88,6 +98,16 @@
ansible.builtin.debug:
var: 'php__modules__combined_var'

# refresh the apt cache so the following `state: latest` upgrade resolves
# against current metadata, e.g. to roll out security updates. apt does not
# auto-expire its cache the way dnf does, so without this the upgrade can
# silently run against a stale cache and miss newer versions.
- name: 'apt update # update the cache'
ansible.builtin.apt:
update_cache: true
changed_when: false # refreshing the package cache is not a config change
when: 'ansible_facts["os_family"] == "Debian"'

- name: 'Update PHP modules' # noqa package-latest (we explicitly want latest here)
# providing the packages as a list is much more faster than looping for each
ansible.builtin.package:
Expand Down