From cbcac7a4cd583bb0d8ce2b66d23a4583fb67ee35 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Wed, 22 Feb 2017 11:25:53 +0000 Subject: [PATCH] buildmaster: try running selinux context change async --- roles/taskotron/buildmaster/tasks/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/taskotron/buildmaster/tasks/main.yml b/roles/taskotron/buildmaster/tasks/main.yml index 131d09be22..a7fc1022cb 100644 --- a/roles/taskotron/buildmaster/tasks/main.yml +++ b/roles/taskotron/buildmaster/tasks/main.yml @@ -52,6 +52,9 @@ - name: make sure the selinux fcontext is restored command: restorecon -R "{{ buildmaster_home }}" when: deployment_type in ['dev', 'stg', 'prod', 'qa-stg'] + async: 300 + poll: 0 + register: selinux_context - name: allow httpd tcp connections with selinux seboolean: name=httpd_can_network_connect state=true persistent=yes @@ -92,3 +95,9 @@ - name: put robots.txt at web root of external hostname when: robots_path is defined template: src=robots.txt.j2 dest={{ robots_path }}/robots.txt owner=apache group=apache mode=0644 + +- name: check on selinux context change + async_status: jid={{ selinux_context.ansible_job_id }} + register: job_result + until: job_result.finished + retries: 30