Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create new VM #1

Closed
pziemkowski opened this issue Dec 10, 2015 · 2 comments
Closed

Can't create new VM #1

pziemkowski opened this issue Dec 10, 2015 · 2 comments
Labels

Comments

@pziemkowski
Copy link

Hello,

I am trying to use this role to create new VM and I encountered a problem while running domain/create role.

Here is my playbook:

---
- hosts: all
  sudo: yes
  user: vagrant

  roles:
    - ansible-libvirt/host/provision
    - ansible-libvirt/images/ubuntu-cloud
    - ansible-libvirt/domain/create

here is an output:

TASK: [ansible-libvirt/domain/create | ports | ssh] *************************** 
fatal: [default] => One or more undefined variables: 'dict object' has no attribute 'ssh_port'

I'm really new to ansible, so there is a possibility that I'm doing something wrong.
Should I set some role specific variables to create a domain? Can't find anything in comments.

@arBmind
Copy link
Member

arBmind commented Dec 15, 2015

Thx, for the first ticket here and sorry that it did not worked for you.
These roles are considered unstable, for the lack of public examples.

To create a named domain, you need the following arguments.

---
  roles:
  - role: hicknhack-software.libvirt/domain/create
    libvirt_domain_name: "example"
    libvirt_ssh_port: 37331
    libvirt_domain_groups: ['example']

Doing a domain/list combined with some add_host we get all domains into our Ansible run and provision them with the groups.
Maybe I will find some time soon, to add an example.

Good luck!
Feel free to ask, if you have questions.

@arBmind
Copy link
Member

arBmind commented May 2, 2016

I close this question. Created issue #5

@arBmind arBmind closed this as completed May 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants