Skip to content

Commit

Permalink
Merge pull request #133 from ceph/mergify/bp/pacific/pr-128
Browse files Browse the repository at this point in the history
ceph_orch_host: fix bug when state is 'absent' (backport #128)
  • Loading branch information
guits authored Jun 21, 2022
2 parents 0c6b59d + 141f040 commit 82fe0d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/ceph_orch_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ def main() -> None:
set_admin_label = module.params.get('set_admin_label')
labels = module.params.get('labels')
state = module.params.get('state')
if state == 'absent':
state = 'rm'

startd = datetime.datetime.now()
changed = False
Expand Down Expand Up @@ -233,7 +235,7 @@ def main() -> None:
if not rc:
changed = True

if state in ['absent', 'drain']:
if state in ['rm', 'drain']:
if name not in current_names:
out = '{} is not present, skipping.'.format(name)
else:
Expand Down

0 comments on commit 82fe0d2

Please sign in to comment.