ceph_uid: 167
when: ceph_docker_image is search("rhceph")
+ # NOTE: changed from file module to raw chown command for performance reasons
+ # The file module has to run checks on current ownership of all directories and files. This is unnecessary
+ # as in this case we know we want all owned by ceph user
- name: set proper ownership on ceph directories
- file:
- path: "{{ item }}"
- owner: "{{ ceph_uid }}"
- recurse: yes
- with_items:
- - /var/lib/ceph
- - /etc/ceph
+ command: "chown -R {{ ceph_uid }} /var/lib/ceph /etc/ceph"
+ changed_when: false
- name: check for existing old leveldb file extension (ldb)
shell: stat /var/lib/ceph/mon/*/store.db/*.ldb
ceph_uid: 167
when: ceph_docker_image_tag | string is search("centos") or ceph_docker_image is search("rhceph") or ceph_docker_image_tag | string is search("fedora")
+ # NOTE: changed from file module to raw chown command for performance reasons
+ # The file module has to run checks on current ownership of all directories and files. This is unnecessary
+ # as in this case we know we want all owned by ceph user
- name: set proper ownership on ceph directories
- file:
- path: "{{ item }}"
- owner: "{{ ceph_uid }}"
- recurse: yes
- with_items:
- - /var/lib/ceph
- - /etc/ceph
+ command: "chown -R {{ ceph_uid }} /var/lib/ceph /etc/ceph"
+ changed_when: false
tasks:
- import_role:
ceph_uid: 167
when: ceph_docker_image is search("rhceph")
+ # NOTE: changed from file module to raw chown command for performance reasons
+ # The file module has to run checks on current ownership of all directories and files. This is unnecessary
+ # as in this case we know we want all owned by ceph user
- name: set proper ownership on ceph directories
- file:
- path: "{{ item }}"
- owner: "{{ ceph_uid }}"
- recurse: yes
- with_items:
- - /var/lib/ceph
- - /etc/ceph
+ command: "chown --verbose -R {{ ceph_uid }} /var/lib/ceph /etc/ceph"
+ changed_when: false
- name: check for existing old leveldb file extension (ldb)
shell: stat /var/lib/ceph/osd/*/current/omap/*.ldb
ceph_uid: 167
when: ceph_docker_image_tag | string is search("centos") or ceph_docker_image is search("rhceph") or ceph_docker_image_tag | string is search("fedora")
+ # NOTE: changed from file module to raw chown command for performance reasons
+ # The file module has to run checks on current ownership of all directories and files. This is unnecessary
+ # as in this case we know we want all owned by ceph user
- name: set proper ownership on ceph directories
- file:
- path: "{{ item }}"
- owner: "{{ ceph_uid }}"
- recurse: yes
- with_items:
- - /var/lib/ceph
- - /etc/ceph
+ command: "chown -R {{ ceph_uid }} /var/lib/ceph /etc/ceph"
+ changed_when: false
tasks:
- import_role:
ceph_uid: 167
when: ceph_docker_image_tag | string is search("centos") or ceph_docker_image is search("rhceph") or ceph_docker_image_tag | string is search("fedora")
+ # NOTE: changed from file module to raw chown command for performance reasons
+ # The file module has to run checks on current ownership of all directories and files. This is unnecessary
+ # as in this case we know we want all owned by ceph user
- name: set proper ownership on ceph directories
- file:
- path: "{{ item }}"
- owner: "{{ ceph_uid }}"
- recurse: yes
- with_items:
- - /var/lib/ceph
- - /etc/ceph
+ command: "chown -R {{ ceph_uid }} /var/lib/ceph /etc/ceph"
+ changed_when: false
tasks:
- import_role:
ceph_uid: 167
when: ceph_docker_image_tag | string is search("centos") or ceph_docker_image is search("rhceph") or ceph_docker_image_tag | string is search("fedora")
+ # NOTE: changed from file module to raw chown command for performance reasons
+ # The file module has to run checks on current ownership of all directories and files. This is unnecessary
+ # as in this case we know we want all owned by ceph user
- name: set proper ownership on ceph directories
- file:
- path: "{{ item }}"
- owner: "{{ ceph_uid }}"
- recurse: yes
- with_items:
- - /var/lib/ceph
- - /etc/ceph
+ command: "chown -R {{ ceph_uid }} /var/lib/ceph /etc/ceph"
+ changed_when: false
tasks:
- import_role:
ceph_uid: 167
when: ceph_docker_image_tag | string is search("centos") or ceph_docker_image is search("rhceph") or ceph_docker_image_tag | string is search("fedora")
+ # NOTE: changed from file module to raw chown command for performance reasons
+ # The file module has to run checks on current ownership of all directories and files. This is unnecessary
+ # as in this case we know we want all owned by ceph user
- name: set proper ownership on ceph directories
- file:
- path: "{{ item }}"
- owner: "{{ ceph_uid }}"
- recurse: yes
- with_items:
- - /var/lib/ceph
- - /etc/ceph
+ command: "chown -R {{ ceph_uid }} /var/lib/ceph /etc/ceph"
+ changed_when: false
tasks:
- import_role: