public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Scott Mayhew <smayhew@redhat.com>
To: kdevops@lists.linux.dev
Subject: [PATCH 1/2] devconfig/redhat: Fix up a few issues with the install-deps playbook
Date: Tue,  3 Sep 2024 10:48:46 -0400	[thread overview]
Message-ID: <20240903144847.355326-1-smayhew@redhat.com> (raw)

1. Replace the "Install btrfs-progs" task with a "Add btrfs-progs to
   install package list" task.  Due to a collision with the "packages"
   variable, the "Install btrfs-progs" task was actually installing
   everything on the previously declared list, regardless of whether
   devconfig_try_install_kdevtools was enabled or not.

2. Add a when clause so that the following tasks only run when
   devconfig_try_install_kdevtools is enabled (no point in messing with
   the packages list if we're not going to ultimately run the install
   task):
        * Build install package list
        * Add btrfs-progs to install package list
        * Add GNU screen to install package list
        * Add Tmux to install package list

3. Remove the "Add systemd-journal-remote to install package list" task.
   It's redundant because there's a task later in the playbook that
   will install systemd-journal-remote when
   devconfig_enable_systemd_journal_remote is enabled.

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
 .../tasks/install-deps/redhat/main.yml        | 34 ++++++-------------
 1 file changed, 11 insertions(+), 23 deletions(-)

diff --git a/playbooks/roles/devconfig/tasks/install-deps/redhat/main.yml b/playbooks/roles/devconfig/tasks/install-deps/redhat/main.yml
index 5a0f1e2..7078443 100644
--- a/playbooks/roles/devconfig/tasks/install-deps/redhat/main.yml
+++ b/playbooks/roles/devconfig/tasks/install-deps/redhat/main.yml
@@ -111,41 +111,29 @@
       - net-snmp
       - trace-cmd
       - perf
+  when:
+    - devconfig_try_install_kdevtools|bool
 
-- name: Install btrfs-progs
-  become: yes
-  become_method: sudo
-  yum:
-    update_cache: yes
-    name: "{{ packages }}"
-  retries: 3
-  delay: 5
-  register: result
-  until: result.rc == 0
-  vars:
-    packages:
-      - btrfs-progs
-  when: ansible_distribution == 'Fedora'
+- name: Add btrfs-progs to install package list
+  set_fact:
+    packages: "{{ packages + [ 'btrfs-progs' ] }}"
+  when:
+    - devconfig_try_install_kdevtools|bool
+    - ansible_distribution == 'Fedora'
 
 - name: Add GNU screen to install package list
   set_fact:
     packages: "{{ packages + [ 'screen' ] }}"
   when:
-    ansible_facts['os_family']|lower != 'redhat' or ansible_facts['distribution_major_version'] | int < 8
+    - devconfig_try_install_kdevtools|bool
+    - ansible_facts['os_family']|lower != 'redhat' or ansible_facts['distribution_major_version'] | int < 8
 
 - name: Add Tmux to install package list
   set_fact:
     packages: "{{ packages + [ 'tmux' ] }}"
   when:
-    ansible_facts['os_family']|lower == 'redhat' or ansible_facts['distribution_major_version'] | int >= 8
-
-- name: Add systemd-journal-remote to install package list
-  set_fact:
-    packages: "{{ packages + [ 'systemd-journal-remote' ] }}"
-  when:
-    - devconfig_enable_systemd_journal_remote|bool
+    - devconfig_try_install_kdevtools|bool
     - ansible_facts['os_family']|lower == 'redhat' or ansible_facts['distribution_major_version'] | int >= 8
-  tags: journal-upload
 
 - name: Install packages we typically care about
   become: yes
-- 
2.44.0


             reply	other threads:[~2024-09-03 14:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-03 14:48 Scott Mayhew [this message]
2024-09-03 14:48 ` [PATCH 2/2] gitr: Make gitr work on RHEL/CentOS Scott Mayhew
2024-09-04 15:38   ` Chuck Lever
2024-09-04 18:07     ` Scott Mayhew
2024-09-04 18:38       ` Chuck Lever

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=20240903144847.355326-1-smayhew@redhat.com \
    --to=smayhew@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox