DOC - Adopting the common role documentation pattern
As discussed during the Newton design summit, we agreed to adopt the role documentation pattern laid out in the os_keystone role Change-Id: Ifbf6c90481a6b40781341dce2b1992a6baebe633
This commit is contained in:
parent
cf2d0f6507
commit
3d41e00e9a
95
README.rst
95
README.rst
@ -1,75 +1,32 @@
|
|||||||
OpenStack LXC container create
|
OpenStack-Ansible LXC container create
|
||||||
##############################
|
######################################
|
||||||
:tags: openstack, lxc, container, cloud, ansible
|
|
||||||
:category: \*nix
|
|
||||||
|
|
||||||
Role for creating LXC containers. This role has been setup for use in OpenStack. This role will
|
Ansible role for creating LXC containers. This role will create several
|
||||||
create several directories on the LXC host for use in bind mounted storage within the container.
|
directories on the LXC host for use in bind mounted storage within the
|
||||||
|
container.
|
||||||
|
|
||||||
Example Play:
|
Default Variables
|
||||||
.. code-block:: yaml
|
=================
|
||||||
|
|
||||||
- name: Create container(s)
|
.. literalinclude:: ../../defaults/main.yml
|
||||||
hosts: all_containers
|
:language: yaml
|
||||||
gather_facts: false
|
:start-after: under the License.
|
||||||
user: root
|
|
||||||
roles:
|
Required Variables
|
||||||
- { role: "lxc_container_create", tags: [ "lxc-container-create" ] }
|
==================
|
||||||
|
|
||||||
|
None
|
||||||
|
|
||||||
|
|
||||||
Example Inventory:
|
Example Playbook
|
||||||
.. code-block:: json
|
================
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
- name: Create container(s)
|
||||||
|
hosts: all_containers
|
||||||
|
gather_facts: false
|
||||||
|
user: root
|
||||||
|
roles:
|
||||||
|
- { role: "lxc_container_create" }
|
||||||
|
|
||||||
{
|
|
||||||
"all_containers": {
|
|
||||||
"children": [
|
|
||||||
"group_of_containers"
|
|
||||||
],
|
|
||||||
"hosts": []
|
|
||||||
},
|
|
||||||
"lxc_hosts": {
|
|
||||||
"children": [],
|
|
||||||
"hosts": [
|
|
||||||
"infra1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"group_of_containers": {
|
|
||||||
"children": [],
|
|
||||||
"hosts": [
|
|
||||||
"container1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"_meta": {
|
|
||||||
"hostvars": {
|
|
||||||
"infra1": {
|
|
||||||
"ansible_ssh_host": "192.168.0.1",
|
|
||||||
"container_address": "192.168.0.1",
|
|
||||||
"container_name": "infra1",
|
|
||||||
"container_networks": {
|
|
||||||
"management_address": {
|
|
||||||
"bridge": "br-mgmt",
|
|
||||||
"interface": "eth1",
|
|
||||||
"netmask": "255.255.252.0",
|
|
||||||
"type": "veth"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"container1": {
|
|
||||||
"ansible_ssh_host": "10.0.0.1",
|
|
||||||
"container_address": "10.0.0.1",
|
|
||||||
"container_name": "container1",
|
|
||||||
"container_networks": {
|
|
||||||
"management_address": {
|
|
||||||
"address": "10.0.0.1",
|
|
||||||
"bridge": "br-mgmt",
|
|
||||||
"interface": "eth1",
|
|
||||||
"netmask": "255.255.252.0",
|
|
||||||
"type": "veth"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"physical_host": "infra1",
|
|
||||||
"physical_host_group": "lxc_hosts"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,15 +1 @@
|
|||||||
Example Index for role docs
|
.. include:: ../../README.rst
|
||||||
============================
|
|
||||||
|
|
||||||
Role to create LXC containers. This role can be used to configure
|
|
||||||
multiple networks within a container and do specific container
|
|
||||||
tuning.
|
|
||||||
|
|
||||||
|
|
||||||
Basic Role Example
|
|
||||||
^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
|
||||||
|
|
||||||
- role: "lxc_container_create"
|
|
||||||
lxc_container_backing_store: dir
|
|
Loading…
Reference in New Issue
Block a user