Skip to content

Commit

Permalink
fixes ssh key gen idempotency
Browse files Browse the repository at this point in the history
if all keys are generated, due to the condition, the service tries to
start always but isn't because the conditions aren't met
  • Loading branch information
wookietreiber committed Jan 10, 2025
1 parent a42fcf4 commit e0f5d82
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions roles/ssh/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@
name: '{{ __ssh_genkeys }}'
state: started
become: yes
register: __ssh_keys_generated
changed_when:
- __ssh_keys_generated.changed
- __ssh_keys_generated.status.ConditionResult == 'yes'
when: __ssh_genkeys is defined
tags:
- ssh-host-keys
Expand Down

0 comments on commit e0f5d82

Please sign in to comment.