From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D20D72773CA for ; Sat, 6 Dec 2025 16:56:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765040193; cv=none; b=QULM86rLJ6VIjF7pcOJMR5VeuZohaeEsFhl/ztOo7CKIqQtt9Dj1VHLcI1MoV/xDCFRp48o8Ix9NUY4BJICGytT/l58Zviox3WFHrvBex3ME3zWhw6GX2WYXXOmM3PdyQ5ZHigjcbkLkqs5sLMzlQN+nJs4K7XtYblVcVyejdvw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765040193; c=relaxed/simple; bh=3d+AQjNa0HEEmojotcNi6e52sHaB0iNfYm99HlsFsSI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jQlenzgE93HCjI572no55p1kfyV/1FoytpaJhiFTv7yrFW80REFFK3taLvzvGKnY5QJL8O1cZ0bz4XesCnWzw4YnEt41VxoGHgfJedGyeFODcKM2oQQQR/6GikIWTqq+/fc6N1XBlu9vzADUPDRRJgJuqjK2PAGFbMHEuMtCoeU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=DvtcL7yh; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="DvtcL7yh" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=A5JMJdlJ7wucwWHIHQ5INOGXifz6Ubmw23YfLN5pcZ8=; b=DvtcL7yhDthqpiN4LAa+Lx9+gw iIHvaABamAd49CzypkTFCkM7En9kgv4cqKuUKP4+08OYf7fylHDBgk8WRQbH8d926uecIb68TQoQj TAtGLfAi1a6deI7QLzP2dI+htFeP7IXo9Bi/j1mMH+ClhdeHciDFiu5K9BqN3Fn4iuf65gIS8FAzL 8/Jl7dXwZd0qtjiw3MWtVJMe9UaRwmHPfSd2uZLag/+EdUabs5Rb1JFgj9sQ6cFDCk8Z7grxnqaIR UxbYUldyiAcG03p7aDQd0HtXlUNd4afW0K5OwRFxoetg2l/UeWzNLvhRBmLvmzrB4hLyJiD/rmF72 6R+wcr7g==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1vRva5-0000000B4pX-0jln; Sat, 06 Dec 2025 16:56:25 +0000 From: Luis Chamberlain To: Chuck Lever , Daniel Gomez , kdevops@lists.linux.dev Cc: Luis Chamberlain Subject: [PATCH 2/8] devconfig: Add tmux.conf copying to target systems Date: Sat, 6 Dec 2025 08:56:16 -0800 Message-ID: <20251206165624.2640158-3-mcgrof@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251206165624.2640158-1-mcgrof@kernel.org> References: <20251206165624.2640158-1-mcgrof@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain Added support for copying the user's local tmux.conf configuration to target systems during devconfig setup, following the same pattern as gitconfig copying. If a ~/.tmux.conf file exists on the control host, it will be copied to both the user home directory and root home directory on target nodes. The implementation checks for tmux.conf existence on localhost, copies it to the target user directory if present, and then copies to root using remote_src for efficient transfer. This ensures consistent terminal multiplexer configuration across all development systems. Generated-by: Claude AI Signed-off-by: Luis Chamberlain --- playbooks/roles/devconfig/defaults/main.yml | 4 ++++ playbooks/roles/devconfig/tasks/main.yml | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/playbooks/roles/devconfig/defaults/main.yml b/playbooks/roles/devconfig/defaults/main.yml index 122cb898..4953f6aa 100644 --- a/playbooks/roles/devconfig/defaults/main.yml +++ b/playbooks/roles/devconfig/defaults/main.yml @@ -9,6 +9,10 @@ dev_gitconfig_src: "~/.gitconfig" # Where we copy it to dev_gitconfig_dest: "{{ data_home_dir }}/.gitconfig" +# Tmux configuration +dev_tmux_conf_src: "~/.tmux.conf" +dev_tmux_conf_dest: "{{ data_home_dir }}/.tmux.conf" + # The bash script we check for on the virtual machine dev_bash_config: "{{ data_home_dir }}/.bashrc" dev_bash_config_root: "/root/.bashrc" diff --git a/playbooks/roles/devconfig/tasks/main.yml b/playbooks/roles/devconfig/tasks/main.yml index ba55928e..325981a0 100644 --- a/playbooks/roles/devconfig/tasks/main.yml +++ b/playbooks/roles/devconfig/tasks/main.yml @@ -155,6 +155,23 @@ ansible.builtin.copy: src={{ dev_gitconfig_dest }} dest=/root/ remote_src=yes when: dev_git_config_file.stat.exists +- name: Check if the developer has a tmux config + delegate_to: localhost + ansible.builtin.stat: path={{ dev_tmux_conf_src }} + run_once: true + register: dev_tmux_config_file + +- name: Copy the developer's tmux.conf *if* it exists + ansible.builtin.copy: src={{ dev_tmux_conf_src }} dest={{ dev_tmux_conf_dest }} + when: dev_tmux_config_file.stat.exists + +- name: Copy the developer's tmux.conf *if* it exists to root + become: true + become_flags: "su - -c" + become_method: sudo + ansible.builtin.copy: src={{ dev_tmux_conf_dest }} dest=/root/ remote_src=yes + when: dev_tmux_config_file.stat.exists + - name: Check if the system has a user vimrc file ansible.builtin.stat: path: ~/.vimrc -- 2.51.0