public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Chuck Lever <cel@kernel.org>, Daniel Gomez <da.gomez@kruces.com>,
	kdevops@lists.linux.dev
Cc: Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH 2/8] devconfig: Add tmux.conf copying to target systems
Date: Sat,  6 Dec 2025 08:56:16 -0800	[thread overview]
Message-ID: <20251206165624.2640158-3-mcgrof@kernel.org> (raw)
In-Reply-To: <20251206165624.2640158-1-mcgrof@kernel.org>

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 <mcgrof@kernel.org>
---
 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


  parent reply	other threads:[~2025-12-06 16:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-06 16:56 [PATCH 0/8] neoclouds: add new datacrunch / verda support Luis Chamberlain
2025-12-06 16:56 ` [PATCH 1/8] terraform: Use directory checksum in SSH key filenames Luis Chamberlain
2025-12-06 22:28   ` Chuck Lever
2025-12-12 19:14     ` Chuck Lever
2025-12-15 15:41       ` Chuck Lever
2025-12-06 16:56 ` Luis Chamberlain [this message]
2025-12-06 16:56 ` [PATCH 3/8] terraform: Enable fact gathering for localhost Luis Chamberlain
2025-12-07 16:23   ` Chuck Lever
2025-12-06 16:56 ` [PATCH 4/8] terraform: Add DataCrunch GPU cloud provider integration Luis Chamberlain
2025-12-16 16:12   ` Chuck Lever
2025-12-06 16:56 ` [PATCH 5/8] kconfig: Add support for merging defconfig fragments Luis Chamberlain
2025-12-07 16:25   ` Chuck Lever
2025-12-07 20:37   ` Daniel Gomez
2025-12-06 16:56 ` [PATCH 6/8] terraform: Add tier-based GPU selection for Lambda Labs Luis Chamberlain
2025-12-16 18:05   ` Chuck Lever
2025-12-06 16:56 ` [PATCH 7/8] terraform: Document " Luis Chamberlain
2025-12-16 19:30   ` Chuck Lever
2025-12-06 16:56 ` [PATCH 8/8] docs: Organize cloud providers with Neoclouds section Luis Chamberlain

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=20251206165624.2640158-3-mcgrof@kernel.org \
    --to=mcgrof@kernel.org \
    --cc=cel@kernel.org \
    --cc=da.gomez@kruces.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