From bed78872f910faa4c1267fd6acf34772e52863e7 Mon Sep 17 00:00:00 2001 From: Tobias Wolf Date: Thu, 9 Nov 2017 18:49:49 +0100 Subject: [PATCH] Synchronize: Document the private_key option (#32754) `synchronize` has supported the `private_key` option for a long time, apparently. But for some reason it was never documented. Today I managed to workaround the synchronize quoting bug by just using ``` private_key: /path/to/id_rsa ``` instead of ``` rsync_opts: - "--rsh 'ssh -i /path/to/id_rsa'" ``` So, I'll just go ahead and document this useful option ... --- lib/ansible/modules/files/synchronize.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ansible/modules/files/synchronize.py b/lib/ansible/modules/files/synchronize.py index 5e6f9b7855..b7d7c07bbb 100644 --- a/lib/ansible/modules/files/synchronize.py +++ b/lib/ansible/modules/files/synchronize.py @@ -146,6 +146,10 @@ options: type: bool default: 'no' version_added: "2.0" + private_key: + description: + - Specify the private key to use for SSH-based rsync connections (e.g. C(~/.ssh/id_rsa)) + version_added: "1.6" notes: - rsync must be installed on both the local and remote host. - For the C(synchronize) module, the "local host" is the host `the synchronize task originates on`, and the "destination host" is the host