[Patchew-devel] [PATCH] playbooks: apply SELinux context to nginx.sock

Paolo Bonzini posted 1 patch 1 year ago
Failed in applying to current master (apply log)
scripts/playbooks/deploy-servers.yml | 8 ++++++++
1 file changed, 8 insertions(+)
[Patchew-devel] [PATCH] playbooks: apply SELinux context to nginx.sock
Posted by Paolo Bonzini 1 year ago
---
 scripts/playbooks/deploy-servers.yml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/scripts/playbooks/deploy-servers.yml b/scripts/playbooks/deploy-servers.yml
index 6b81f9a..2a24cab 100644
--- a/scripts/playbooks/deploy-servers.yml
+++ b/scripts/playbooks/deploy-servers.yml
@@ -31,6 +31,11 @@
       file:
         path: "{{ data_dir }}"
         state: directory
+    - name: Setting SELinux context
+      sefcontext:
+        setype: httpd_var_run_t
+        target: "{{ data_dir }}/nginx.sock"
+      become: true
     - name: Create podman network
       containers.podman.podman_network:
         name: patchew
@@ -38,6 +43,9 @@
     - import_tasks: tasks/podman-deploy.yml
       vars:
         instance_role: server
+    - name: Apply new SELinux file context to filesystem
+      command: "restorecon -v {{ data_dir }}/nginx.sock"
+      become: true
     - name: Create superuser
       when: superuser_name != ""
       shell: |
-- 
2.38.1

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/patchew-devel