--- - name: Create rados gateway instance directories ansible.builtin.file: path: "/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.{{ item.instance_name }}" state: directory owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}" group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}" mode: "{{ ceph_directories_mode | default('0755') }}" with_items: "{{ rgw_instances }}" - name: Generate environment file ansible.builtin.copy: dest: "/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.{{ item.instance_name }}/EnvironmentFile" owner: "root" group: "root" mode: "0644" content: | INST_NAME={{ item.instance_name }} with_items: "{{ rgw_instances }}" when: - containerized_deployment | bool - rgw_instances is defined