def test017():
    class SimpleNamespace(NamespaceModel):
        with_variables(Var("PING_TARGET", find_ip()),
                       Var("RUSER", "lxle1"),
                       Var("RPASS", file("/home/lxle1/Documents/pass", "r").read().strip()))
        ping_target = Role("ping-target", host_ref=find_ip())
    ns = SimpleNamespace()
       
    class SimpleConfig(ConfigModel):
        ping = PingTask("ping", task_role=SimpleNamespace.ping_target,
                        remote_user="!{RUSER}",
                        remote_pass="!{RPASS}")
    cfg = SimpleConfig()
    ea = AnsibleExecutionAgent(config_model_instance=cfg,
                               namespace_model_instance=ns,
                               no_delay=True)
    try:
        ea.perform_config()
    except ExecutionException, e:
        import traceback
        for task, etype, value, tb in ea.get_aborted_tasks():
            print ">>>Task {} failed with the following:".format(task.name)
            traceback.print_exception(etype, value, tb, file=sys.stdout)
            print
        assert False, e.message
test017: ping as another user, use password instead of key: requires sshpass, but frequently fails anyway with a Broken Pipe for some reason
dataset/ETHPy150Open haxsaw/actuator/src/tests/ansible_tests.py/test017