@@ -21,9 +21,6 @@ inputs:
2121 disk_size :
2222 default : 80GB
2323
24- agent_private_key :
25- default : { get_secret: agent_private_key }
26-
2724 # cluster(kvm) settings
2825 cluster_user :
2926 type : string
@@ -151,7 +148,7 @@ node_templates:
151148 - path : /etc/cloudify/kvm.key
152149 owner : cfyuser:cfyuser
153150 permissions : ' 0400'
154- content : { get_input: agent_private_key }
151+ content : { get_input: agent_key_private }
155152 - path : /etc/cloudify/kvm.key.pub
156153 owner : cfyuser:cfyuser
157154 permissions : ' 0400'
@@ -234,7 +231,7 @@ node_templates:
234231 use_public_ip : true
235232 agent_config :
236233 user : { get_input: agent_user }
237- key : { get_input: agent_private_key }
234+ key : { get_input: agent_key_private }
238235 install_method : remote
239236 interfaces :
240237 cloudify.interfaces.lifecycle :
@@ -247,7 +244,7 @@ node_templates:
247244 terminal_auth : &terminal_auth
248245 user : { get_input: agent_user }
249246 ip : { get_attribute: [SELF, ip] }
250- key_content : { get_input: agent_private_key }
247+ key_content : { get_input: agent_key_private }
251248 port : 22
252249 promt_check :
253250 - ' $'
@@ -265,6 +262,15 @@ node_templates:
265262 - action : sudo usermod -a -G libvirt cfyuser
266263 - action : sudo usermod -a -G kvm cfyuser
267264 - action : sudo usermod -a -G qemu cfyuser
265+ # enable ssh connect
266+ - action : sudo mkdir -p /etc/cloudify/.ssh/
267+ # enable write for current user, will fix on next step
268+ - action : sudo chmod 777 -R /etc/cloudify/.ssh
269+ # dump ssh key to known_hsot
270+ - action : {concat:["sudo ssh-keyscan -H ", { get_input: cluster_host }, " >> /etc/cloudify/.ssh/known_hosts"]}
271+ - action : sudo chmod 700 /etc/cloudify/.ssh
272+ - action : sudo chmod 600 /etc/cloudify/.ssh/known_hosts
273+ - action : sudo chown cfyuser:cfyuser -R /etc/cloudify/.ssh
268274 # upload plugins
269275 - action : cfy profile use localhost -u admin -p admin -t default_tenant
270276 - action : cfy plugins bundle-upload
0 commit comments