From f671aa033180a8b588a140975978df0290e99fe4 Mon Sep 17 00:00:00 2001 From: Valentin Gologuzov Date: Thu, 9 Apr 2015 14:03:18 +0200 Subject: [PATCH] [copr] do restorecon immediately after the mount_fs --- roles/copr/frontend/tasks/main.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/copr/frontend/tasks/main.yml b/roles/copr/frontend/tasks/main.yml index 055e7e3d15..877727054a 100644 --- a/roles/copr/frontend/tasks/main.yml +++ b/roles/copr/frontend/tasks/main.yml @@ -1,6 +1,13 @@ --- - include: "mount_fs.yml" +- command: "ls -dZ /var/lib/pgsql" + register: pgsql_ls + +- name: update selinux context for postgress db dir if it's wrong + command: "restorecon -vvRF /var/lib/pgsql" + when: "'postgresql_db_t' not in pgsql_ls.stdout " + - name: install pkgs for copr-frontend action: yum state=present pkg={{ item }} with_items: @@ -90,10 +97,3 @@ when: devel copy: src=banner-include.html dest=/var/lib/copr/ - -- command: "ls -dZ /var/lib/pgsql" - register: pgsql_ls - -- name: update selinux context for postgress db dir if it's wrong - command: "restorecon -vvRF /var/lib/pgsql" - when: "'postgresql_db_t' not in pgsql_ls.stdout "