Bump courier_imap to v0.2.0 #1

Merged
mgbruin merged 1 commit from fix/bump-courier-imap-v0.2.0 into main 2026-09-09 19:13:46 +00:00
Owner

courier_imap_verify_port was used as both the switch and the value, so the
task's own guard read 993 | bool, which is False. The verification never ran.

It reported success on every run while never checking that anything answered on
993, which is the single thing it exists to check, and on a day when the config
was twice correct while the service was down. ansible-core 2.23 removes that
coercion, so this would have become an error rather than a warning.

The switch is now courier_imap_verify, defaulting true, separate from the port.

setup, lint and validate green with the new pin.

Diff

courier_imap v0.1.0..v0.2.0
diff --git a/README.md b/README.md
index 7753ca5..f230c61 100644
--- a/README.md
+++ b/README.md
@@ -41,5 +41,6 @@ role's decision.
 
 ## Verification
 
-After a change it flushes handlers and waits for port 993. Twice on the day this
-was written the file was correct while nothing answered on that port.
+After a change it flushes handlers and waits for port 993, guarded by
+`courier_imap_verify`. Twice on the day this was written the file was correct
+while nothing answered on that port.
diff --git a/defaults/main.yml b/defaults/main.yml
index 2359574..d49eba2 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -20,6 +20,6 @@ courier_imap_settings:
 courier_imap_service: courier-imap-imapd-ssl
 courier_imap_rc_enable_var: courier_imap_imapd_ssl_enable
 
-# The port the service must be listening on after a change. Set false to skip
-# the check.
+# Confirm the service is actually accepting connections after a change.
+courier_imap_verify: true
 courier_imap_verify_port: 993
diff --git a/tasks/main.yml b/tasks/main.yml
index 394298e..e2d068d 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -62,5 +62,7 @@
     host: "{{ ansible_facts['default_ipv4']['address'] | default('127.0.0.1') }}"
     timeout: 15
   when:
-    - courier_imap_verify_port | bool
+    # Guarded by its own boolean: `993 | bool` is False, which skipped this
+    # check silently while reporting success.
+    - courier_imap_verify | bool
     - not ansible_check_mode

🤖 Generated with Claude Code

https://claude.ai/code/session_01AdRRYZW5G6sNUAvotZs9U8

`courier_imap_verify_port` was used as both the switch and the value, so the task's own guard read `993 | bool`, which is False. The verification never ran. It reported success on every run while never checking that anything answered on 993, which is the single thing it exists to check, and on a day when the config was twice correct while the service was down. ansible-core 2.23 removes that coercion, so this would have become an error rather than a warning. The switch is now `courier_imap_verify`, defaulting true, separate from the port. setup, lint and validate green with the new pin. ## Diff <details><summary><code>courier_imap</code> v0.1.0..v0.2.0</summary> ```diff diff --git a/README.md b/README.md index 7753ca5..f230c61 100644 --- a/README.md +++ b/README.md @@ -41,5 +41,6 @@ role's decision. ## Verification -After a change it flushes handlers and waits for port 993. Twice on the day this -was written the file was correct while nothing answered on that port. +After a change it flushes handlers and waits for port 993, guarded by +`courier_imap_verify`. Twice on the day this was written the file was correct +while nothing answered on that port. diff --git a/defaults/main.yml b/defaults/main.yml index 2359574..d49eba2 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -20,6 +20,6 @@ courier_imap_settings: courier_imap_service: courier-imap-imapd-ssl courier_imap_rc_enable_var: courier_imap_imapd_ssl_enable -# The port the service must be listening on after a change. Set false to skip -# the check. +# Confirm the service is actually accepting connections after a change. +courier_imap_verify: true courier_imap_verify_port: 993 diff --git a/tasks/main.yml b/tasks/main.yml index 394298e..e2d068d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -62,5 +62,7 @@ host: "{{ ansible_facts['default_ipv4']['address'] | default('127.0.0.1') }}" timeout: 15 when: - - courier_imap_verify_port | bool + # Guarded by its own boolean: `993 | bool` is False, which skipped this + # check silently while reporting success. + - courier_imap_verify | bool - not ansible_check_mode ``` </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01AdRRYZW5G6sNUAvotZs9U8
The port check was guarded by the port number itself, so it silently skipped
on every run. Verified: setup, lint and validate green with the new pin.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AdRRYZW5G6sNUAvotZs9U8
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mgbruin/ansible_playbook_mailserver!1
No description provided.