Hi Daniel again

On 03/21/2018 09:33 AM, [email protected] wrote:
> Hi Rene, Hi Boris,
> 
> Thanks @Boris for the information about Marvin. I guess in our case (running 
> automated test against our prod environment) that would not be the ideal 
> choice.
> 
>> This would be very easy to do with ansible.
>>
>> It would even allow to log in to the deployed VM and run tasks on the
>> VM, e.g. install packages like a webserver and then check if the
>> webserver is accessable from the CI system.
>>  
>> Or in case of VPC integration tests: verify if a configured site2site
>> VPN works, etc. All with ansible's battery included...
>>  
>> https://github.com/resmo/ansible-cloudstack-example may give you some
>> ideas how to setup.
> 
> The ansible approach however looks promising, thank you. Going to look into 
> that and find out how to write "tests" using ansible. I'm much more addicted 
> to programming in Python than I am to ansible, and from the automation point 
> of view we are using puppet, so let's see what happens. :-)

If you like, you could even write ansible playbooks in python. Ansible
is in Python... But I don't see a real benefit

However, probably one more quickstart hint, I already wrote playbooks to
test the ansible modules.

These are located in
https://github.com/ansible/ansible/blob/devel/test/integration/targets/

and prefixed with cs_

e.g

https://github.com/ansible/ansible/blob/devel/test/integration/targets/cs_domain/tasks/main.yml

The nice thing is the interaction with the "assert" module which allows
to compare the return values from the cloudstack modules to be in the
expected state.

Have fun! ;)

Reply via email to