From d0a4e0706ca5924218a5250c4d44200dd1c56821 Mon Sep 17 00:00:00 2001 From: Sergii Golovatiuk Date: Fri, 5 Mar 2021 13:29:59 +0100 Subject: [PATCH] Replace user with openssh_keypair On Fedora 33 user: doesn't create id_rsa.pub, so next task fails as TASK [Slurp pub key] fatal: [test]: FAILED! => { "changed": false } MSG: file not found: /home/sgolovat/.ssh/id_rsa.pub This patch replaces user: with openssh_keypair: to have more control over ssh key pair creation Change-Id: I6b303c13957f905aae0a04ea99cf53ceb9684de2 --- tests/prepare-test-host.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/prepare-test-host.yml b/tests/prepare-test-host.yml index e870fc279..e017ccbf8 100644 --- a/tests/prepare-test-host.yml +++ b/tests/prepare-test-host.yml @@ -44,11 +44,9 @@ mode: "0700" - name: Create ssh key pair - user: - name: "{{ ansible_user }}" - generate_ssh_key: true - ssh_key_bits: 2048 - ssh_key_file: "{{ ansible_user_dir }}/.ssh/id_rsa" + openssh_keypair: + path: "{{ ansible_user_dir }}/.ssh/id_rsa" + size: 2048 - name: Slurp pub key slurp: