Symlink generation fails in initial dry-run execution (snap)
tobiashuste opened this issue · 0 comments
tobiashuste commented
When executing the role initially via dry-run the task Symlink certbot into place.
fails to execute because the src file is not present.
ansible-role-certbot/tasks/install-with-snap.yml
Lines 32 to 36 in dd1f8bd
Error message:
FAILED! => {"changed": false, "msg": "src file does not exist, use \"force=yes\" if you really want to create the link: /snap/bin/certbot", "path": "/usr/bin/certbot", "src": "/snap/bin/certbot"}
My proposed change would be to ignore the error for this task when being run in check mode.
- name: Symlink certbot into place.
file:
src: /snap/bin/certbot
dest: /usr/bin/certbot
state: link
ignore_errors: "{{ ansible_check_mode }}"