Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
c83bdc1a
Commit
c83bdc1a
authored
Apr 27, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add virt guest creation to virt module docs
parent
2e57c40c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
library/virt
+18
-8
No files found.
library/virt
View file @
c83bdc1a
...
...
@@ -55,18 +55,28 @@ options:
- XML document used with the define command
required: false
default: null
examples:
- code: "virt: name=alpha state=running"
description: "Example from Ansible Playbooks"
- code: ansible host -m virt -a "name=alpha command=status"
description: "Example guest management with C(/usr/bin/ansible)"
- code: ansible host -m virt -a "name=alpha command=get_xml"
description: "Use C(/usr/bin/ansible) to get the xml of the guest machine alpha"
- code: ansible host -m virt -a "name=alpha command=create uri=lxc:///"
requirements: [ "libvirt" ]
author: Michael DeHaan, Seth Vidal
'''
EXAMPLES
=
'''
# a playbook task line:
tasks:
- virt: name=alpha state=running
# /usr/bin/ansible invocations
ansible host -m virt -a "name=alpha command=status"
ansible host -m virt -a "name=alpha command=get_xml"
ansible host -m virt -a "name=alpha command=create uri=lxc:///"
# a playbook example of defining and launching an LXC guest
tasks:
- name: define vm
virt: name=foo command=define xml="{{ lookup('template', 'container-template.xml.j2') }}" uri=lxc:///
- name: start vm
virt: name=foo state=running uri=lxc:///
'''
VIRT_FAILED
=
1
VIRT_SUCCESS
=
0
VIRT_UNAVAILABLE
=
2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment