>
> Here is my packer script:

{
  "builders": [
    {
      "type": "docker",
      "communicator": "docker",
      "image": "{{user `base_image`}}",
      "commit": true,
      "run_command": [ "-d", "-i", "-t", "--name", "ubuntu_test", 
"{{.Image}}", "/bin/bash" ]
    }
 ],
    "provisioners": [
       { 
         "type": "shell",
         "inline": [ "apt-get -y update && apt-get install -y python-dev" ]
},
        {
          "type": "ansible",
          "user": "root",
          "playbook_file": "../ansible/playbook.{{user `image_name`}}.yml",
          "extra_arguments": ["-vvv", "--vault-password-file", 
"../ansible/vault_password", "--extra-vars", "ansible_host=ubuntu_test 
ansible_connection=docker ansible_python_interpreter=/usr/bin/python"]
      }
    ],
   "post-processors": [
      {
        "type": "docker-tag",
        "repository": "{{user `repository`}}",
        "tag": "latest"
      },
      {
        "type": "docker-tag",
        "repository": "{{user `repository`}}",
        "tag": "{{user `image_tag`}}"
      },
      {
        "type": "docker-push",
        "ecr_login": true,
        "login_server": "{{user `login_server`}}",
        "aws_access_key": "",
        "aws_secret_key": "",
        "keep_input_artifact": false
      } 
    ]
} 

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" 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/ansible-project/4285ba3a-1d22-4967-b2e4-83d7fe301a80%40googlegroups.com.

Reply via email to