Kai,

On 13/07/16 15:27, Kai wrote:
Mark, Toshaan,

thanks for your answers.
So it's not possible using only the provided modules, you have to invoke
shell commands as well.
Well, it should be possible, with the virt module, run a install XML and then run the post install XML, then you would only use the template and the virt module, however since the virt-install module does this much better and I haven't figured a way how to write an acceptable and nice virt-install ansible module, I use a shell script


You both use a module "qemu-img" which doesn't seem to be provided with
ansible by default!?
Yes, this module was not accepted by Michael very long time ago.
I just created a PR, let's see if we can get it in now.
In the mean time if you require it, you can find it at :
https://raw.githubusercontent.com/toshywoshy/ansible-vm-install/master/playbooks/library/qemu-img , this is my old vm install playbook


Thanks & cheers, Kai

Regards,
Toshaan.


On 13-07-16 14:25, Toshaan Bharvani | VanTosh wrote:

On 13/07/16 14:21, Mark Janssen wrote:
You can run a kickstart or preseed installation, import disk-images or
do various other things... For example see (an old version) of my
provisioning config:

https://github.com/sigio/sigio-provisioning
Here is the one I use :
    https://github.com/toshywoshy/ansible-role-vminstaller
It is a role so you can import it into your structure.

I still need to push some updates and I have added support for Ubuntu,
not yet in the repo, but it gives you a clear idea how to set it up.



These days I use something a bit different, which isn't in a releasable
form at this time.

On Wed, Jul 13, 2016 at 12:13 AM, Kai <[email protected]
<mailto:[email protected]>> wrote:

    Dear all!

    Does a kind soul have a pointer for me to a more detailed
documentation
    of the virt module or of handling libvirt VMs in general?

    I can define a VM, I should be able to start/stop it. What I didn't
    figure out yet is how to install the initial OS on the VM (from a
    playbook, of course).

    Cheers, Kai
    --
    "Das ist Demokratie, wenn man sich aussuchen darf, wer einen
verarscht."

     (Hagen Rether)
    D-55118 Meenz                                    fast: kai_pf (aT]
    web(dot)de
    ++ PGP Key fingerprint  B567 C43E 99D1 7709 7D64  3BF8 2DE8 1092
    0EEF D58E ++
    -----BEGIN GEEK CODE BLOCK-----
    VERSION: 3.12
    GCS/IT/CM d- s:- a+>-----(?) C++$ UL++(++++$) P+++ L++ E-(+) W--(+) N
    !w---($) !O !M V? PS+ PE-() Y+ PGP(+) t R*@ tv--@ b+>++ DI++ G
    e+++(*) h? y?
    ------END GEEK CODE BLOCK------


    --
    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]
    <mailto:ansible-project%[email protected]>.
    To post to this group, send email to
    [email protected]
    <mailto:[email protected]>.
    To view this discussion on the web visit

https://groups.google.com/d/msgid/ansible-project/1468361628.5583.9.camel%40wintermute.

    For more options, visit https://groups.google.com/d/optout.




--
Mark Janssen  --  maniac(at)maniac.nl <http://maniac.nl>
Unix / Linux Open-Source and Internet Consultant
Maniac.nl Sig-IO.nl Vps.Stoned-IT.com <http://Vps.Stoned-IT.com>

--
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]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAKs9msgkdE%2BfO9QrObPibs%2B%2BpaOEa%3DWi0T8vug_mONrKsGne8g%40mail.gmail.com

<https://groups.google.com/d/msgid/ansible-project/CAKs9msgkdE%2BfO9QrObPibs%2B%2BpaOEa%3DWi0T8vug_mONrKsGne8g%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.




--
          Toshaan Bharvani
         +32-(0)476-66.70.55
         [email protected]
--
__     __        _____         _
\ \   / /_ _ _ _|_   _|__  ___| |__
 \ \ / / _` | '_ \| |/ _ \/ __| '_ \
  \ V / (_| | | | | | (_) \__ \ | | |
   \_/ \__,_|_| |_|_|\___/|___/_| |_|

       http://www.vantosh.com

      Quinten Matsijslei 38 bus 20
       B-2018 Antwerpen, Belgium
--

--
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/13453f75-1922-4170-81cd-20a53a95e6ca%40vantosh.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to