ceph / ceph-ansible

Ansible playbooks to deploy Ceph, the distributed filesystem.
Apache License 2.0
1.69k stars 1.01k forks source link

Don't try to set devices fact when osd_auto_discovery was skipped (backport #7620) #7621

Closed mergify[bot] closed 3 weeks ago

mergify[bot] commented 4 weeks ago

Right now, under certain OS and Ansible versions, ie Rocky Linux and ansible-core 2.17, devices_check variable is getting defined even if task was skipped.

That results in set_fact to fail, as resulting variable has no results key in it.

Structure of such variable looks like that:

"devices_check": {
    "changed": false,
    "false_condition": "osd_auto_discovery | default(False) | bool",
    "skip_reason": "Conditional result was False",
    "skipped": true
}

Checking for task not being skipped solves such issues.

Signed-Off-By: Dmitriy Rabotyagov noonedeadpunk@gmail.com


This is an automatic backport of pull request #7620 done by Mergify.

clwluvw commented 3 weeks ago

jenkins test centos-non_container-switch_to_containers

clwluvw commented 3 weeks ago

jenkins test centos-container-update

clwluvw commented 3 weeks ago

jenkins test centos-container-update