Error saying "Timeout (12s) waiting for privilege escalation prompt: or Connection to 127.0.0.1 closed.\r\n"

0 votes

Packer file contents:

{
  "provisioners": [{
    "type": "ansible",
    "playbook_file": "../ansible/nexus.yml"
  }],

  "builders": [{
    "type": "amazon-ebs",
    "region": "us-east-2",
    "source_ami_filter": {
        "filters": {
            "virtualization-type": "hvm",
            "name": "amzn-ami-hvm*-gp2",
            "root-device-type": "ebs"
        },
        "owners": ["137112412989"],
        "most_recent": true
    },
    "instance_type": "t2.medium",
    "ami_virtualization_type": "hvm",
    "ssh_username": "ec2-user",
    "ami_name": "Nexus (Latest Amazon Linux Base) {{isotime \"2006-01-02T15-04-05-06Z\"| clean_ami_name}}",
    "ami_description": "Nexus AMI",
    "run_tags": {
        "AmiName": "Nexus",
        "AmiCreatedBy": "Packer"
    },
    "tags": {
        "Name": "Nexus",
        "CreatedBy": "Packer"
    }
  }]
}

I end up with this error

Timeout (12s) waiting for privilege escalation prompt: or Connection to 127.0.0.1 closed.\r\n

Feb 9 in Ansible by Sinha
83 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey @Sinha, add these parameters in your ansible.config and then try running

[defaults]
forks = 1

[ssh_connection]
ssh_args = -o ControlMaster=no -o ControlPath=none -o ControlPersist=no
pipelining = false
answered Feb 9 by Monish

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer

Error saying "No handler was ready to authenticate. 1 handlers were checked"

You are mixing underscore and hyphen. cat /etc/ansible/ec2-vars/tes ...READ MORE

answered Mar 13 in Ansible by Kim
44 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.