Skip to content

Commit

Permalink
Refactor role verification task
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyphreak committed May 4, 2024
1 parent dbce832 commit 1f14bb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions molecule/common/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
- name: Verify Consul server node role
ansible.builtin.assert:
that: consul_role == 'server'
when: inventory_hostname in groups['consul_server']
when: inventory_hostname in (groups['consul_server'] | default(groups['all']))

- name: Verify Consul client node role
ansible.builtin.assert:
that: consul_role == 'client'
when: inventory_hostname in groups['consul_client']
when: inventory_hostname in (groups['consul_client'] | default([]))

- name: Verify Consul cluster status
block:
Expand Down

0 comments on commit 1f14bb9

Please sign in to comment.