diff mbox series

[v1,1/4] linux-mirror: Fix installation on Fedora systems

Message ID 20250310183208.999430-2-cel@kernel.org (mailing list archive)
State New
Headers show
Series Fixes for git mirroring on Fedora | expand

Commit Message

Chuck Lever March 10, 2025, 6:32 p.m. UTC
From: Chuck Lever <chuck.lever@oracle.com>

I noticed that git-daemon was not installed when I set up the git
mirror on my Fedora 40 control host.

If "include_tasks:" has a tag, the included tasks also need to have a
"tags:" attribute or they will not be run.

Also, because my lab is already behind a firewall gateway, there
happens to be no firewall running on my controller, so the "enable
the git port" step fails with:

firewall is not currently running, unable to perform immediate actions without a running firewall daemon

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 .../roles/linux-mirror/tasks/install-deps/fedora/main.yml | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/playbooks/roles/linux-mirror/tasks/install-deps/fedora/main.yml b/playbooks/roles/linux-mirror/tasks/install-deps/fedora/main.yml
index 2a93256a3d6e..01e98895cabe 100644
--- a/playbooks/roles/linux-mirror/tasks/install-deps/fedora/main.yml
+++ b/playbooks/roles/linux-mirror/tasks/install-deps/fedora/main.yml
@@ -9,6 +9,11 @@ 
     state: present
   when:
     - install_linux_mirror|bool
+  tags: [ 'mirror' ]
+
+- name: Gather service facts
+  ansible.builtin.service_facts:
+  tags: [ 'mirror' ]
 
 - name: Open the firewall on control node for git traffic
   become: true
@@ -22,3 +27,6 @@ 
     state: enabled
   when:
     - install_linux_mirror|bool
+    - '"firewalld.service" in ansible_facts.services'
+    - ansible_facts.services['firewalld.service'].state == "enabled"
+  tags: [ 'mirror' ]