Merge "'Update validate autorelease projects for fluorine"
[releng/builder.git] / packer / templates / robot.json
index 33aa9f6547ebc637d11ea1c3e84a29afc941cfc8..d0f61e78de72d1c24daa5fbfa6d91eeaf4ef02b2 100644 (file)
@@ -1,5 +1,6 @@
 {
   "variables": {
+    "ansible_roles_path": ".galaxy",
     "base_image": null,
     "distro": null,
     "cloud_auth_url": null,
@@ -14,7 +15,8 @@
   "builders": [
     {
       "name": "vexxhost",
-      "image_name": "ZZCI - {{user `distro`}} - robot - {{isotime \"20060102-1504\"}}",
+      "image_name": "ZZCI - {{user `distro`}} - robot - {{isotime \"20060102-150405.000\"}}",
+      "instance_name": "{{user `distro`}}-robot-{{uuid}}",
       "source_image_name": "{{user `base_image`}}",
       "type": "openstack",
       "identity_endpoint": "{{user `cloud_auth_url`}}",
       ],
       "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
     },
+    {
+      "type": "shell-local",
+      "command": "./common-packer/ansible-galaxy.sh {{user `ansible_roles_path`}}"
+    },
     {
       "type": "ansible",
       "playbook_file": "provision/robot.yaml",
       "ansible_env_vars": [
         "ANSIBLE_NOCOWS=1",
         "ANSIBLE_PIPELINING=True",
-        "ANSIBLE_ROLES_PATH=../lf-ansible/roles",
+        "ANSIBLE_ROLES_PATH={{user `ansible_roles_path`}}",
         "ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
         "ANSIBLE_STDOUT_CALLBACK=debug"
       ]