]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
ceph-rgw: Make sure pool name templates are expanded
authorBenoît Knecht <bknecht@protonmail.ch>
Mon, 11 May 2020 13:49:32 +0000 (15:49 +0200)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Mon, 11 May 2020 15:51:27 +0000 (11:51 -0400)
commitd2b7670c7dea29bd1072b65ce2ccdccccf97550d
tree5230bcfbf781dbf7c06ec18ea147fd0de34227c2
parentbd1440f2cd7e52435c6533970789e0f7ee791f31
ceph-rgw: Make sure pool name templates are expanded

It is common to set templated pool names in `rgw_create_pools`, e.g.

```yaml
rgw_create_pools:
  "{{ rgw_zone }}.rgw.buckets.index":
    pg_num: 16
    size: 3
    type: replicated
```

This worked fine with Ansible 2.8, but broke in Ansible 2.9 due to a change in
the way `with_dict` works [1].

This commit replaces the use of `with_dict` with

```yaml
loop: "{{ rgw_create_pools | dict2items }}"
```

which works as intended and expands the template in the pool name.

[1]: https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.9.html#loops

Closes #5348

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
roles/ceph-rgw/tasks/rgw_create_pools.yml