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
This commit is contained in:
Pavlo Shchelokovskyy 2017-01-26 16:55:49 +02:00
parent 299a7259aa
commit d336d43e98

View File

@ -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: >