Role lxc_container_create for OpenStack-Ansible
Go to file
Jesse Pretorius 48b6be8448 Add dependencies for paramiko 2.0
Paramiko version 2.0 has been released. It now uses the Python library
cryptography. Installing this requires additional system packages. This
commit adds in the appropriate packages required by cryptography based
on its documentation [1].

An alternative approach would have been to constrain the version of
Paramiko however the project describes the 1.x versions as relying on
insecure dependencies [2].

[1] https://cryptography.io/en/latest/installation/
[2] http://www.paramiko.org/installing.html

Change-Id: I10a27799aff51e46488bfb8e47d86e75283d91d5
2016-05-03 08:54:23 +01:00
defaults Ability to define the mtu globally (for all the container networks) 2015-12-02 17:22:17 +01:00
doc Updates for typos 2015-12-08 16:50:45 -06:00
handlers IRR for lxc_container_create 2015-11-03 08:00:45 -06:00
meta IRR for lxc_container_create 2015-11-03 08:00:45 -06:00
releasenotes Remove Liberty releasenote index 2016-04-20 22:18:56 +01:00
tasks Removed useless "when" 2016-04-27 09:42:42 +01:00
templates Ensure container network type is defaulted to veth 2016-03-30 20:18:39 -07:00
tests Remove dependency on python2_lxc git source 2016-03-24 12:09:04 +00:00
.gitignore Adding Vagrantfile for local developer testing 2016-04-22 13:36:45 -04:00
.gitreview New git dotfiles for independant repository 2015-11-26 00:43:02 +00:00
CONTRIBUTING.rst IRR for lxc_container_create 2015-11-03 08:00:45 -06:00
LICENSE IRR for lxc_container_create 2015-11-03 08:00:45 -06:00
README.rst IRR for lxc_container_create 2015-11-03 08:00:45 -06:00
Vagrantfile Adding Vagrantfile for local developer testing 2016-04-22 13:36:45 -04:00
other-requirements.txt Add dependencies for paramiko 2.0 2016-05-03 08:54:23 +01:00
run_tests.sh Add dependencies for paramiko 2.0 2016-05-03 08:54:23 +01:00
setup.cfg Updates for typos 2015-12-08 16:50:45 -06:00
setup.py IRR for lxc_container_create 2015-11-03 08:00:45 -06:00
test-requirements.txt blacklist Ansible 1.9.6 2016-04-16 08:47:15 -05:00
tox.ini Add reno scaffolding for release notes management 2016-04-09 19:18:38 +01:00

README.rst

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",
                }
            }
        }
    }
}