---
- name: update period
  command: radosgw-admin period update --commit

- name: restart rgw
  service:
    name: ceph-radosgw@rgw.{{ ansible_host }}
    state: restarted

---
- name: update period
  command: radosgw-admin period update --commit

- name: restart rgw
  service:
    name: ceph-radosgw@rgw.{{ ansible_hostname }}
    state: restarted

Use hostname instead of host (host can be an IP) and hostname matches the default nomenclature in ceph.conf
Use hostname instead of host (host can be an IP) and hostname matches the default nomenclature in ceph.conf
