]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
ceph-rgw-loadbalancer: Fix rgw_ports fact
authorBenoît Knecht <bknecht@protonmail.ch>
Tue, 13 Apr 2021 11:57:44 +0000 (13:57 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 15 Apr 2021 11:20:55 +0000 (13:20 +0200)
commitfb35ca364bc837d9dc0db703d3740c8089a66765
tree92bfe435245b3b5b327bd234fa51a460994bfdb7
parent4468bd913d0388f7a419e4d2f1be34a7ef3209e0
ceph-rgw-loadbalancer: Fix rgw_ports fact

The `set_fact rgw_ports` task was failing due to a templating error, because
`hostvars[item].rgw_instances` is a list, but it was treated as if it was a
dictionary.

Another issue was the fact that the `unique` filter only applied to the list
being appended to `rgw_ports` instead of the entire list, which means it was
possible to have duplicate items.

Lastly, `rgw_ports` would have been a list of integers, but the `seport` module
expects a list of strings.

This commit fixes all of the issues above, allowing the `ceph-rgw-loadbalancer`
role to work on systems with SELinux enabled.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
(cherry picked from commit c07851347521b09c39b556818378767fc23f05e5)
roles/ceph-rgw-loadbalancer/tasks/pre_requisite.yml