Skip to content

Commit

Permalink
Merge pull request #31 from Diesel-Net/development
Browse files Browse the repository at this point in the history
add separate check for idempotent case
  • Loading branch information
tomdaley92 committed Jan 16, 2024
2 parents bc39c79 + 0376be8 commit 70c818c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tasks/swarm_init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@
register: cmd
vars:
opts: '{{ options.swarm_init }}'
failed_when: 'cmd.rc > 1 or "node is already part of a swarm" not in cmd.stderr.lower()'
failed_when: 'cmd.rc > 1'

- name: 'check idempotent case'
meta: noop
failed_when: '"node is already part of a swarm" not in cmd.stderr.lower()'
when: 'cmd.rc == 1

0 comments on commit 70c818c

Please sign in to comment.