Skip to content

Commit

Permalink
Merge pull request #144 from ceph/mergify/bp/pacific/pr-142
Browse files Browse the repository at this point in the history
ceph_orch_host: fix set_admin_label (backport #142)
  • Loading branch information
guits authored Jul 4, 2022
2 parents 254b20d + 3a3dd6b commit 6e5f308
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/ceph_orch_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ def main() -> None:
current_names = [name['hostname'] for name in current_state]

if state == 'present':
if set_admin_label:
labels.append('_admin')
if name in current_names:
current_state_host = [host for host in current_state if host['hostname'] == name][0]
if set_admin_label:
labels.append('_admin')
if labels:
differences = set(labels) ^ set(current_state_host['labels'])
if differences:
Expand Down

0 comments on commit 6e5f308

Please sign in to comment.