Guys,

 Currently, I have a task that add a bunch of images on Glance, but using 
shell/command module, like this:

---
- name: Adding a few Operating System images into Glance
  environment: "{{admin_openrc_env}}"
  command: "{{item}}"
  with_items:
  - glance image-create --location 
http://uec-images.ubuntu.com/releases/14.04/14.04.4/ubuntu-14.04-server-cloudimg-i386-disk1.img
 
--name "Ubuntu 14.04.4 LTS - Trusty Tahr - 32-bit - Cloud Based Image" 
--is-public true --container-format bare --disk-format qcow2
  - glance image-create --location 
http://uec-images.ubuntu.com/releases/14.04/14.04.4/ubuntu-14.04-server-cloudimg-amd64-disk1.img
 
--name "Ubuntu 14.04.4 LTS - Trusty Tahr - 64-bit - Cloud Based Image" 
--is-public true --container-format bare --disk-format qcow2
  when: openstack_installation == 'yes'
---

 This is so great, because I don't need to download all those images during 
OpenStack provisioning, and Glance downloads each of those only by demand!

 However, I'm now exploring "os_image", and other Ansible OpenStack 
modules... Looks promising!

 But, "os_image" does not have something similar with "--location"! Do you 
guys have any suggestion?

 Does "filename" "os_image" option, supports URLs? Like "file:///", or 
"http://?

 I would like to move to "os_image", because then, I'll be able to get rid 
of my ugly "when contidion", called "openstack_installation"... Otherwise, 
Ansible will duplicates the images entries over and over again... On the 
other hand, new "os_image" doesn't duplicate anything on subsequent runs, 
which is great! But I need the "--location" feature...

 Thoughts?

 https://docs.ansible.com/ansible/os_image_module.html

Cheers!
Thiago

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/296d96fc-4c3c-4dcd-88f5-97cdc77f20b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to