Selaa lähdekoodia

Merge pull request #8519 from mrunalp/fixup_docker_selinux

docker: Fixup graph directory labels after docker starts
Scott Dodson 6 vuotta sitten
vanhempi
commit
6d42a699f0
1 muutettua tiedostoa jossa 11 lisäystä ja 11 poistoa
  1. 11 11
      roles/container_runtime/tasks/package_docker.yml

+ 11 - 11
roles/container_runtime/tasks/package_docker.yml

@@ -137,17 +137,6 @@
   changed_when: False
   register: r_docker_already_running_result
 
-- name: Check for docker_storage_path/overlay2
-  stat:
-    path: "{{ docker_storage_path }}/overlay2"
-  register: dsp_stat
-
-- name: Fixup SELinux permissions for docker
-  shell: |
-           semanage fcontext -a -e /var/lib/docker/overlay2 "{{ docker_storage_path }}/overlay2"
-           restorecon -R -v "{{ docker_storage_path }}/overlay2"
-  when: dsp_stat.stat.exists
-
 - name: Start the Docker service
   systemd:
     name: docker
@@ -162,4 +151,15 @@
 - set_fact:
     docker_service_status_changed: "{{ (r_docker_package_docker_start_result is changed) and (r_docker_already_running_result.stdout != 'ActiveState=active' ) }}"
 
+- name: Check for docker_storage_path/overlay2
+  stat:
+    path: "{{ docker_storage_path }}/overlay2"
+  register: dsp_stat
+
+- name: Fixup SELinux permissions for docker
+  shell: |
+           semanage fcontext -a -e /var/lib/docker/overlay2 "{{ docker_storage_path }}/overlay2"
+           restorecon -R -v "{{ docker_storage_path }}/overlay2"
+  when: dsp_stat.stat.exists
+
 - import_tasks: common/post.yml