The os_image module does not support an option similar to 'location'. 
Support would first
have to be added to the shade library (used by os_image) before we could 
add support to
the module.

If you're interested in contributing, you can find the shade source here:

   http://git.openstack.org/cgit/openstack-infra/shade/

We discuss shade on #openstack-infra on Freenode.

-Dave


On Saturday, March 12, 2016 at 1:26:50 AM UTC-5, Thiago Martins wrote:
>
> 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/32045222-23f5-40c3-88b0-e07e7bcf1272%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to