Jean-Philippe Evrard 6e94a195ec Ability to define the mtu globally (for all the container networks)
Currently, deployers can override MTUs on a per-network basis,
but may be looking for a way to define the mtu globally.

This implements a variable named ``lxc_container_default_mtu``
that currently defaults to 1500 (standard value). If this variable
is set, it will globally override the mtu, while still keeping the
per-network override.

Change-Id: Ia7e4f9e929f513ddc09e6de9467ec6ff765e2e6f
Closes-Bug: #1518311
2015-12-02 17:22:17 +01:00
2015-11-03 08:00:45 -06:00
2015-11-03 08:00:45 -06:00
2015-11-03 08:00:45 -06:00
2015-11-03 08:00:45 -06:00
2015-11-25 16:46:19 -06:00
2015-11-03 08:00:45 -06:00
2015-11-03 08:00:45 -06:00
2015-11-03 08:00:45 -06:00
2015-11-03 08:00:45 -06:00
2015-11-03 08:00:45 -06:00
2015-11-03 08:00:45 -06:00
2015-11-03 08:00:45 -06:00

OpenStack 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 create several directories on the LXC host for use in bind mounted storage within the container.

Example Play:
- name: Create container(s)
  hosts: all_containers
  gather_facts: false
  user: root
  roles:
    - { role: "lxc_container_create", tags: [ "lxc-container-create" ] }
Example Inventory:
{
    "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"
                    }
                },
                "properties": {
                    "container_release": "trusty",
                    "is_metal": true
                }
            },
            "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",
                "properties": {
                    "container_release": "trusty",
                }
            }
        }
    }
}
Description
Role lxc_container_create for OpenStack-Ansible
Readme 5.4 MiB
Languages
Python 45.3%
Shell 27.7%
Jinja 27%