Description:
-----------------
I am trying to execute a ansible playbook in my base.json but it's throwing 
me permission related errors:

Error:
-------
amazon-ebs: fatal: [localhost]: FAILED! => {"changed": false, "failed": 
true, "module_stderr": "sudo: a password is required\n", "module_stdout": 
"", "msg": "MODULE FAILURE", "parsed": false}

site.yml:
------------
---
- hosts: localhost
  become: yes
  roles:
    - tomcat


base.json:
--------------

{

    "provisioners": [{
            "type": "shell",
            "inline": [
                "sleep 5"
            ]
        },
        {
            "type": "ansible",
            "playbook_file": "./ansible/site.yml"
        }
    ],
    "builders": [{
        "type": "amazon-ebs",
        "access_key": "",
        "secret_key": "",
        "region": "***********",
        "subnet_id": "***********",
        "vpc_id": "***********",
        "source_ami": "**********",
        "instance_type": "t2.micro",
        "ssh_username": "ec2-user",
        "ami_name": "tomcat {{timestamp}}",
        "ssh_pty": "true",
        "security_group_ids": ["***********", "***********"]
    }]
}


Thanks in advance

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/da34e3b5-6a3d-4392-9728-bd9817ba0e09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to