Skip to content

Commit

Permalink
Upgrade task to use get_checksum instead of deprecated get_md5
Browse files Browse the repository at this point in the history
When running on the stable version of ansible, I got the following error:

```
TASK [sunfoxcz.dkim : ensure signing key is present] *******************************************************************
fatal: [hostname]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (stat) module: get_md5. Supported parameters include: checksum_algorithm, follow, get_attributes, get_checksum, get_mime, path (attr, attributes, checksum, checksum_algo, dest, mime, mime-type, mime_type, name)."}
```

After looking online for the error, I found this occurrence for a similar case:

geerlingguy/ansible-role-swap#32

Seems like `get_md5` is deprecated, so this change modifies it to use `get_checksum`.
  • Loading branch information
guillermo authored and foxycode committed Jan 29, 2024
1 parent df438ec commit 1864d0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/opendkim_keys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- name: ensure signing key is present
stat:
path: "{{ dkim_opendkim_config_dir }}/keys{{ '' if dkim_same_key else '/' ~ dkim_domain }}/{{ dkim_selector }}.private"
get_md5: no
get_checksum: false
register: dkim_key

- name: generate signing key
Expand Down

0 comments on commit 1864d0e

Please sign in to comment.