ceph-ansible/roles/ceph-facts
Dmitriy Rabotyagov e751b2960a Don't try to set devices fact when osd_auto_discovery was skipped
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>
(cherry picked from commit 9405558d03)
2024-10-28 22:22:28 +00:00
..
meta address Ansible linter errors 2024-03-07 21:03:32 +01:00
tasks Don't try to set devices fact when osd_auto_discovery was skipped 2024-10-28 22:22:28 +00:00
README.md introduce new role ceph-facts 2018-12-12 11:18:01 +01:00

README.md

Ansible role: ceph-facts

Documentation is available at http://docs.ceph.com/ceph-ansible/.