From d336d43e9860e013853aad4fd220c3bdfa64e716 Mon Sep 17 00:00:00 2001 From: Pavlo Shchelokovskyy Date: Thu, 26 Jan 2017 16:55:49 +0200 Subject: [PATCH] Remove local actions for ssh keys bifrost already deploys ironic to 'target' host (remote or local), executing ssh-keys related tasks as local_action is no longer needed and in fact fails when installing ironic on a remote host. Change-Id: I51dd5e6d16d91935b7bcb1e2506c5c4e82b52165 --- .../tasks/bootstrap.yml | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml b/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml index babf7276d..a873f2484 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml @@ -190,32 +190,30 @@ testing | bool == false and ssh_private_key is defined - name: "Check for ironic user SSH key" - local_action: stat path=/home/ironic/.ssh/id_rsa + stat: path=/home/ironic/.ssh/id_rsa register: test_ironic_pvt_key - name: "Generate SSH key for ironic user" - local_action: command ssh-keygen -f /home/ironic/.ssh/id_rsa -N "" + command: ssh-keygen -f /home/ironic/.ssh/id_rsa -N "" when: > testing | bool == true and test_ironic_pvt_key.stat.exists | bool == false - name: "Set ownership on ironic SSH private key" - local_action: > - file - name=/home/ironic/.ssh/id_rsa - owner=ironic - group=ironic - mode=0600 - state=file + file: + name: /home/ironic/.ssh/id_rsa + owner: ironic + group: ironic + mode: 0600 + state: file when: > testing | bool == true and test_ironic_pvt_key.stat.exists | bool == false - name: "Set ownership on ironic SSH public key" - local_action: > - file - name=/home/ironic/.ssh/id_rsa.pub - owner=ironic - group=ironic - mode=0644 - state=file + file: + name: /home/ironic/.ssh/id_rsa.pub + owner: ironic + group: ironic + mode: 0644 + state: file when: testing | bool == true and test_ironic_pvt_key.stat.exists | bool == false - name: "Create authorized_keys file for ironic user" command: >