blob: 460e53a07dfb65d04549429a0f9382a82f8950f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
---
- name: Bootstrapping container
hosts: local
tasks:
- name: Creating container
lxc_container:
name: "{{ lxc_base }}"
clone_name: "{{ lxc_name }}"
backing_store: dir
state: stopped
- name: Starting container
lxc_container:
name: "{{ lxc_name }}"
state: started
- name: Waiting for container
shell: until ping -c1 {{ lxc_name }}.lxc; do :; done
changed_when: false
become: true
become_user: root
tags:
- container
|