From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B57AA15667D for ; Tue, 3 Sep 2024 14:48:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725374934; cv=none; b=Fv8p8ZQdBNxpdBSSfB+MQ3k3hA88Zofcb1u2MC43Tvr3RlVz/r9Zhasxp7XvHeqXl8qEJDNMApk4ijkCD+uFvn2N28Sz3EUzQTLcAvhaA6X4fB2xy0WGQ2zwMYL294emZwe4wmzimzeWcWjeX82vFoIK396WkchuPAkqS1+zwjA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725374934; c=relaxed/simple; bh=W5xs53di5HY3wgeMDVqycWrg1bQkw3L8MGsdhILFQqI=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Wx7XJvbw9wf6vVtxgs85Q7FnTmqwQcNp+gdgBumKgi1pFjQg7HH2eoEHx+ok8WQBj77fK0wCKdsaaXbUWb0nN2dZKc3tnkCn/mbSa35T1EVB7buslMS47Exxe1e8wjg6YpvMHoV7w7OeSjybfJDo+gwCbejNEXvvcmoxWLT7OYM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=GXVn4xGP; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GXVn4xGP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725374931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IyZBqEhoeSDd8R3eaMe/ZO5zMkPSrEvIgXZEWOHSc9U=; b=GXVn4xGPvg4GGNqDDkPKNwBcsNucMxVALncDetoQEl5GpuJDR99DJoFYrtRYTIICOwwcZe JjNtCOsn/assPLTc+W3zf5YYAsq+Bo817hldVwJZ4AapnlWS2bL3OlaCashtFqB3su6G2J MAYguwWucMo8c/fwV6OgFuk9w2yTB74= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-530-9wQoDyANMnGZgl8yNWydeQ-1; Tue, 03 Sep 2024 10:48:50 -0400 X-MC-Unique: 9wQoDyANMnGZgl8yNWydeQ-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 918FE1977035 for ; Tue, 3 Sep 2024 14:48:49 +0000 (UTC) Received: from aion.redhat.com (unknown [10.22.9.161]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2A72219560AE for ; Tue, 3 Sep 2024 14:48:48 +0000 (UTC) Received: from aion.redhat.com (localhost [IPv6:::1]) by aion.redhat.com (Postfix) with ESMTP id 40DDC1F1238 for ; Tue, 3 Sep 2024 10:48:47 -0400 (EDT) From: Scott Mayhew 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 Message-ID: <20240903144847.355326-1-smayhew@redhat.com> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 --- .../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