https://github.com/peopledoc/ansible-boot-lxc
Ansible role to boot LXC containers
https://github.com/peopledoc/ansible-boot-lxc
approved-public ghec-mig-migrated
Last synced: 2 months ago
JSON representation
Ansible role to boot LXC containers
- Host: GitHub
- URL: https://github.com/peopledoc/ansible-boot-lxc
- Owner: peopledoc
- Created: 2016-09-21T11:17:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-09T16:05:15.000Z (about 7 years ago)
- Last Synced: 2025-03-22T20:38:17.881Z (3 months ago)
- Topics: approved-public, ghec-mig-migrated
- Language: Python
- Size: 43 KB
- Stars: 0
- Watchers: 6
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
This role instanciates any inventory host that ends with ``.lxc`` and sets it
up for ansible: install python, add your ssh key for root.Note that you need ``lxc``, ``dsnmasq``, and ``sudo`` to be properly configured.
And ``lxc-python2`` (which require ``lxc-dev``) installed in your ansible
environment. That means that you can create a container with internet access and
that you can resolve it by ``name.lxc``. One way to set this up is to use
`novafloss/ansible-setup `_Consider this example inventory::
[flow]
flow.lxc lxc_template_options='-r wheezy'[rabbitmq]
rabbitmq.lxc[redis]
redis.lxcAnd a playbook like that::
---
- hosts: localhost
become: true
become_user: root
roles:
- novafloss.boot-lxc- hosts: redis
roles:
- geerlingguy.redis- hosts: rabbitmq
roles:
- alexey.rabbitmqFirst, novafloss.boot-lxc will start the containers and create them if they
don't exist, then plays will be executed normally on rabbitmq and redis
container hosts.