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.
This commit is contained in:
Julia Kreger 2015-03-04 20:33:21 -05:00
parent c66d3d9001
commit f29f353db3
3 changed files with 4 additions and 2 deletions

View File

@ -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:

View File

@ -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.

View File

@ -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