소스 검색

Only set ownership to etcd for thirdparty datadir

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1428532
Scott Dodson 8 년 전
부모
커밋
fb17c96906
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      roles/etcd/tasks/main.yml

+ 8 - 1
roles/etcd/tasks/main.yml

@@ -63,10 +63,17 @@
     path: "{{ etcd_data_dir }}"
     state: directory
     mode: 0700
+  when: etcd_is_containerized | bool
+
+- name: Ensure etcd datadir ownership for thirdparty datadir
+  file:
+    path: "{{ etcd_data_dir }}"
+    state: directory
+    mode: 0700
     owner: etcd
     group: etcd
     recurse: True
-  when: etcd_is_containerized | bool or etcd_is_thirdparty | bool
+  when: etcd_is_thirdparty | bool
 
   # TODO: Determine if the below reload would work here, for now just reload
 - name: