All of lore.kernel.org
 help / color / mirror / Atom feed
From: cel@kernel.org
To: <kdevops@lists.linux.dev>
Cc: Chuck Lever <chuck.lever@oracle.com>
Subject: [RFC PATCH 1/3] linux-mirror: Add Fedora-specific tasks
Date: Wed,  1 May 2024 10:03:33 -0400	[thread overview]
Message-ID: <20240501140335.49067-1-cel@kernel.org> (raw)

From: Chuck Lever <chuck.lever@oracle.com>

To get mirroring to work on Fedora, I had to install the git-daemon
package, because on Fedora, git-daemon is not included in the
git-core package.

Also, Fedora's default firewall configuration does not permit git
traffic.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 .../tasks/install-deps/fedora/main.yml        | 24 +++++++++++++++++++
 playbooks/roles/linux-mirror/tasks/main.yml   |  5 ++++
 2 files changed, 29 insertions(+)
 create mode 100644 playbooks/roles/linux-mirror/tasks/install-deps/fedora/main.yml

diff --git a/playbooks/roles/linux-mirror/tasks/install-deps/fedora/main.yml b/playbooks/roles/linux-mirror/tasks/install-deps/fedora/main.yml
new file mode 100644
index 000000000000..2a93256a3d6e
--- /dev/null
+++ b/playbooks/roles/linux-mirror/tasks/install-deps/fedora/main.yml
@@ -0,0 +1,24 @@
+---
+- name: Install Fedora-specific dependencies
+  become: true
+  become_flags: 'su - -c'
+  become_method: ansible.builtin.sudo
+  ansible.builtin.package:
+    name:
+      - git-daemon
+    state: present
+  when:
+    - install_linux_mirror|bool
+
+- name: Open the firewall on control node for git traffic
+  become: true
+  become_flags: 'su - -c'
+  become_method: ansible.builtin.sudo
+  ansible.posix.firewalld:
+    zone: libvirt
+    port: 9418/tcp
+    permanent: true
+    immediate: true
+    state: enabled
+  when:
+    - install_linux_mirror|bool
diff --git a/playbooks/roles/linux-mirror/tasks/main.yml b/playbooks/roles/linux-mirror/tasks/main.yml
index 461e131c93fd..a8f673c6d4ee 100644
--- a/playbooks/roles/linux-mirror/tasks/main.yml
+++ b/playbooks/roles/linux-mirror/tasks/main.yml
@@ -10,6 +10,11 @@
       skip: true
   tags: vars
 
+- name: Install dependencies for the linux-mirror role
+  ansible.builtin.include_tasks: install-deps/fedora/main.yml
+  when:
+    - ansible_distribution == 'Fedora'
+
 - name: Set up the mirrors.yaml based on preferences configured
   tags: [ 'mirror' ]
   template:

base-commit: d97440f49b5b5ecb65383a1874014391ca795899
-- 
2.44.0


             reply	other threads:[~2024-05-01 14:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-01 14:03 cel [this message]
2024-05-01 14:03 ` [RFC PATCH 2/3] get-distro-default-bridge.sh: Remove "http://" cel
2024-05-01 14:03 ` [RFC PATCH 3/3] get-distro-default-bridge.sh: Set specific IP address for Fedora cel
2024-05-01 14:29 ` [RFC PATCH 1/3] linux-mirror: Add Fedora-specific tasks Chuck Lever
2024-05-01 19:12 ` Luis Chamberlain
2024-05-02 13:12   ` Chuck Lever III

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240501140335.49067-1-cel@kernel.org \
    --to=cel@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=kdevops@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.