public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 1/2] devconfig/redhat: Fix up a few issues with the install-deps playbook
@ 2024-09-03 14:48 Scott Mayhew
  2024-09-03 14:48 ` [PATCH 2/2] gitr: Make gitr work on RHEL/CentOS Scott Mayhew
  0 siblings, 1 reply; 5+ messages in thread
From: Scott Mayhew @ 2024-09-03 14:48 UTC (permalink / raw)
  To: kdevops

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-09-04 18:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-03 14:48 [PATCH 1/2] devconfig/redhat: Fix up a few issues with the install-deps playbook Scott Mayhew
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox