https://github.com/peopledoc/ansible-role-boot
Ansible role to boot .lxc hosts in an inventory, Vagrantfile provided in novafloss/ansible-setup
https://github.com/peopledoc/ansible-role-boot
ansible-role approved-public ghec-mig-migrated
Last synced: 2 months ago
JSON representation
Ansible role to boot .lxc hosts in an inventory, Vagrantfile provided in novafloss/ansible-setup
- Host: GitHub
- URL: https://github.com/peopledoc/ansible-role-boot
- Owner: peopledoc
- Created: 2016-05-03T08:37:06.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-27T07:41:59.000Z (about 8 years ago)
- Last Synced: 2025-03-22T20:38:19.106Z (3 months ago)
- Topics: ansible-role, approved-public, ghec-mig-migrated
- Homepage:
- Size: 17.6 KB
- Stars: 4
- Watchers: 12
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
.. warn:: This role has been deprecated in favor of ansible-boot-lxc.
The purpose of this role is to start inventory hosts, instanciating them first
if necessary. It will create / start any host which name ends in ``.lxc``.Note that you need ``lxc``, ``dsnmasq``, and ``sudo`` to be properly
configured. And ``lxc-python2`` (which require ``lxc-dev``) installed in your
ansible environement. That means that you can create a container with internet
access and that you can resolve it by ``name.lxc``.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
become_method: sudo
roles:
- pdoc.boot- hosts: redis
roles:
- geerlingguy.redis- hosts: rabbitmq
roles:
- alexey.rabbitmqFirst, pdoc.boot will start the containers and create them if they don't exist,
then plays will be executed normally on rabbitmq and redis container hosts.Note that this will add to your ssh_config::
Host *.lxc
# No need for security for disposable test containers
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
User root