From f29f353db38099537f86b9f33bf3b5a8a45f585d Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Wed, 4 Mar 2015 20:33:21 -0500 Subject: [PATCH] Extracting the ubuntu image and using the correct file The playbook when initialy written failed to extract the Ubuntu image package, and the settings were set for the .tar.gz file to be pushed to the remote server. Corrected the playbook to extract the image and defined the image as the file to utilize. --- deploy/setup_nodes.yaml | 2 +- inventory/group_vars/all.yaml | 2 +- setup/install.yaml | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/deploy/setup_nodes.yaml b/deploy/setup_nodes.yaml index 74293b870..5d5bd6131 100644 --- a/deploy/setup_nodes.yaml +++ b/deploy/setup_nodes.yaml @@ -12,7 +12,7 @@ instance_info: image_source: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:8080/{{deploy_image_filename}}" image_checksum: "{{ test_deploy_image.stat.md5 }}" - image_disk_format: "qcow" + image_disk_format: "raw" root_gb: 10 delegate_to: localhost with_lines: diff --git a/inventory/group_vars/all.yaml b/inventory/group_vars/all.yaml index d0fd19e82..65aeca4b3 100644 --- a/inventory/group_vars/all.yaml +++ b/inventory/group_vars/all.yaml @@ -12,7 +12,7 @@ deploy_kernel: "{{http_boot_folder}}/coreos_production_pxe.vmlinuz" deploy_ramdisk: "{{http_boot_folder}}/coreos_production_pxe_image-oem.cpio.gz" deploy_kernel_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:8080/coreos_production_pxe.vmlinuz" deploy_ramdisk_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:8080/coreos_production_pxe_image-oem.cpio.gz" -deploy_image_filename: "ubuntu-14.04-server-cloudimg-amd64.tar.gz" +deploy_image_filename: "trusty-server-cloudimg-amd64.img" deploy_image: "{{http_boot_folder}}/{{deploy_image_filename}}" node_default_network_interface: eth0 # ipv4_subnet_mask is intended for the static ipv4 address assignments. diff --git a/setup/install.yaml b/setup/install.yaml index 130365fca..5b98c05a4 100644 --- a/setup/install.yaml +++ b/setup/install.yaml @@ -253,3 +253,5 @@ - name: "Download Ubuntu image" local_action: get_url url=http://cloud-images.ubuntu.com/releases/trusty/release/ubuntu-14.04-server-cloudimg-amd64.tar.gz dest={{ deploy_image }} when: test_os_image_present.stat.exists == false + - name: "Extract Ubuntu image" + local_action: command tar -xvzf ubuntu-14.04-server-cloudimg-amd64.tar.gz chdir=/httpboot creates=/httpboot/trusty-server-cloudimg-amd64.img