--- - name: create rados gateway instance directories 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 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