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:
parent
299a7259aa
commit
d336d43e98
@ -190,32 +190,30 @@
|
|||||||
testing | bool == false and
|
testing | bool == false and
|
||||||
ssh_private_key is defined
|
ssh_private_key is defined
|
||||||
- name: "Check for ironic user SSH key"
|
- 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
|
register: test_ironic_pvt_key
|
||||||
- name: "Generate SSH key for ironic user"
|
- 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: >
|
when: >
|
||||||
testing | bool == true and
|
testing | bool == true and
|
||||||
test_ironic_pvt_key.stat.exists | bool == false
|
test_ironic_pvt_key.stat.exists | bool == false
|
||||||
- name: "Set ownership on ironic SSH private key"
|
- name: "Set ownership on ironic SSH private key"
|
||||||
local_action: >
|
file:
|
||||||
file
|
name: /home/ironic/.ssh/id_rsa
|
||||||
name=/home/ironic/.ssh/id_rsa
|
owner: ironic
|
||||||
owner=ironic
|
group: ironic
|
||||||
group=ironic
|
mode: 0600
|
||||||
mode=0600
|
state: file
|
||||||
state=file
|
|
||||||
when: >
|
when: >
|
||||||
testing | bool == true and
|
testing | bool == true and
|
||||||
test_ironic_pvt_key.stat.exists | bool == false
|
test_ironic_pvt_key.stat.exists | bool == false
|
||||||
- name: "Set ownership on ironic SSH public key"
|
- name: "Set ownership on ironic SSH public key"
|
||||||
local_action: >
|
file:
|
||||||
file
|
name: /home/ironic/.ssh/id_rsa.pub
|
||||||
name=/home/ironic/.ssh/id_rsa.pub
|
owner: ironic
|
||||||
owner=ironic
|
group: ironic
|
||||||
group=ironic
|
mode: 0644
|
||||||
mode=0644
|
state: file
|
||||||
state=file
|
|
||||||
when: testing | bool == true and test_ironic_pvt_key.stat.exists | bool == false
|
when: testing | bool == true and test_ironic_pvt_key.stat.exists | bool == false
|
||||||
- name: "Create authorized_keys file for ironic user"
|
- name: "Create authorized_keys file for ironic user"
|
||||||
command: >
|
command: >
|
||||||
|
Loading…
Reference in New Issue
Block a user