Ask Your Question

How to transfer files between puppet client nodes?

asked 2014-04-08 17:20:33 -0500

David Hunt gravatar image

What is the best practice for transferring files between newly-created Linux nodes?

I am configuring a WebLogic cluster on a pair of newly-created VMware Linux virtual machines using the biemond/wls module. Part of the configuration requires copying a tar file (containing a packed WebLogic domain) from one server to the other. The biemond/wls module uses scp to transfer the file. The goal is to have a fully automated process, so there are no manual steps between the Linux server creation and the WebLogic configuration.

The file transfer options I've considered are:

  1. Use sshpass to include the Linux ...

edit retag flag offensive close merge delete


Is this a masterless puppet infrastructure?

ffrank gravatar imageffrank ( 2014-04-08 18:44:06 -0500 )edit

No, the nodes are two clients of a Puppet Enterprise master.

David Hunt gravatar imageDavid Hunt ( 2014-04-09 08:04:16 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-04-09 14:08:56 -0500

ffrank gravatar image

It is fairly straight forward do establish key-based trust among your agent nodes by pre-generating the keypairs.

  1. The SSH server authorizes the public key for the transfer user (an ssh_authorized_key resource in its manifest).
  2. The SSH client(s) receive the id_rsa private key from the master (via the file type).

Take care to either export the SSH host key from the server(s) and add it as known on the client(s) or work with -o StrictHostKeyChecking=no, which is less ideal.

edit flag offensive delete link more


Thanks for the outline and the ssh_authorized_key hint. Starting with a pre-generated key pair I was able to automate the remaining configuration to enable scp without password entry. I accepted the answer.

David Hunt gravatar imageDavid Hunt ( 2014-04-09 17:55:12 -0500 )edit

If using SSH keys between hosts are not viable, is there another way? The puppet master has established keys to each host, is there a way to leverage this to pull content from one node to the master and have the master distribute the data to another node?

Jimmy Diep gravatar imageJimmy Diep ( 2014-10-22 17:57:47 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-04-08 17:20:33 -0500

Seen: 1,019 times

Last updated: Apr 09 '14