I am trying to use cloudify fabric plugin to run a simple command. When I install the blueprint I am getting following error.
Task failed 'fabric_plugin.tasks.run_commands' -> RecoverableError('FabricTaskError: Needed to prompt for a connection or sudo password (host: 10.10.1.10), but abort-on-prompts was set to True',)
Below is my entire blueprint file.
tosca_definitions_version: cloudify_dsl_1_0
imports:
- http://www.getcloudify.org/spec/cloudify/3.2/types.yaml
- http://www.getcloudify.org/spec/fabric-plugin/1.2/plugin.yaml
inputs:
host_ip:
description: >
The ip of the host the application will be deployed on
agent_user:
description: >
Agent User.
agent_private_key_path:
description: >
agent key path
node_templates:
host:
type: cloudify.nodes.Compute
properties:
ip: { get_input: host_ip }
install_agent:
default: false
cloudify_agent:
user: { get_input: agent_user }
key: { get_input: agent_private_key_path }
example_node:
type: cloudify.nodes.WebServer
interfaces:
cloudify.interfaces.lifecycle:
start:
implementation: fabric.fabric_plugin.tasks.run_commands
inputs:
commands:
- ls -lh > ~/list-of-files.txt
relationships:
- type: cloudify.relationships.contained_in
target: host
My inputs.yaml is
agent_private_key_path: /root/.ssh/id_rsa
agent_user: vagrant
host_ip: 10.10.1.10
When I update my blueprint to use following then it works. But is this necessary? I mean this information is already specified in the host. Why do I need to give it again with the fabric plugin.
fabric_env:
host_string: { get_input: host_ip }
user: { get_input: agent_user }
key_filename: { get_input: agent_private_key_path }
Is there anything I am doing wrong. I am just the beginner in this area, so any help will be appreciated.