Fix distro installs

Ubuntu distro packages change /etc/swift/ owner to root, which makes
swift_rings.py fail with Permission denied.
So we shouldt run swift_rings.py as root user for distro deployments.

Change-Id: I3eeec29de43a3fb80bafef104ac87348aca4853e
This commit is contained in:
Dmitriy Rabotyagov 2020-04-14 17:44:32 +03:00
parent 677ab44170
commit 34419fd92b

View File

@ -43,6 +43,15 @@
- "{{ swift.storage_policies }}"
- [{ type: 'object', port: "{{ swift_object_port }}" }]
- name: Ensure swift config directory permissions
file:
path: /etc/swift/
state: directory
owner: "{{ swift_system_user_name }}"
group: "{{ swift_system_group_name }}"
recurse: yes
when: swift_install_method == 'distro'
- name: "Build rings for account/container from contents files"
command: "/etc/swift/scripts/swift_rings.py -f /etc/swift/scripts/{{ item[0] }}.contents{% if item[1] %} -r {{ item[1] }}{% endif %}{{ (swift_pretend_min_part_hours_passed | bool) | ternary(' -p', '')}}"
with_nested: