peopledoc.boot

.. warn:: This role is no longer used because of ansible-boot-lxc.

This role helps to start inventory hosts, creating them first if they don't already exist. It will set up or start any host with a name that ends in .lxc.

You need to have lxc, dnsmasq, and sudo configured correctly. Also, make sure you have lxc-python2 (which requires lxc-dev) installed in your Ansible environment. This setup allows you to create a container with internet access that can be resolved by name.lxc.

Here is an example inventory::

[flow]
flow.lxc lxc_template_options='-r wheezy'

[rabbitmq]
rabbitmq.lxc

[redis]
redis.lxc

And a sample playbook looks like this::

---

- hosts: localhost
  become: true
  become_user: root
  become_method: sudo
  roles:
  - pdoc.boot

- hosts: redis
  roles:
  - geerlingguy.redis

- hosts: rabbitmq
  roles:
  - alexey.rabbitmq

First, pdoc.boot will start the containers and create them if they don’t exist. Then, the plays will run as normal on the rabbitmq and redis container hosts.

This will add the following to your ssh_config::

Host *.lxc
    # No security needed for temporary test containers
    UserKnownHostsFile /dev/null
    StrictHostKeyChecking no
    User root
Informazioni sul progetto

Ansible role to boot lxc instance

Installa
ansible-galaxy install peopledoc.boot
Licenza
Unknown
Download
171.7k
Proprietario
Top-Notch HR Services to Employees. Faster.